var query = from row in table
where row.IdUnit == 10 && row.IdSection == 5
group row by row.IdSystem into rowGroup
let count = rowGroup.Count()
orderby count descending
select new { IdSystem = rowGroup.Key, Count = count };
Replace
table
with whatever you're using to access the database =)