groceriesByDepartment.mapValues { $0.count }
groceriesByDepartment.mapValues(&:count) # not ruby, but meh