var results = employees.GroupBy(e => e.Department). Select(d => new { Department = d.Key, Size = d.Count()});