I have a sorted collection of 4-digit numbers and many of the numbers are duplicated. I'm looking for a quick way to get a count of each unique value. For example if 1234 occurs 3 times in the collection and 2468 occurs 5 times in the collection I'd like to wind up with an array that contains 1234|3 and 2468|5.

Could I use a Dictionary by itself without having to use (and sort) a collection and a separate array?