I have for example this list.
List<int> numbers = new List<int>() { 1, 1, 2, 2, 3, 3, 4 };
And I want to get another list with count of each distinct item in that list, so something like this 2,2,2,1. I guess it is possible to reach it by using foreach, but is it possible in easier way(LINQ maybe)? Thanks.