If you're not using LINQ, you could just use a dictionary to do such.
Ex.
Dictionary<string, int> dict = new Dictionary<string, int>();
int intCount;
foreach (string strValue in values)
{
if (dict.TryGetValue(strValue, out intCount))
dict[strValue] = ++intCount;
else
dict[strValue] = 1;
}
Something like that...after you're done, the dictionary will have all the unique values as keys and the counts of how many for each in the value portion.