Dictionary counts = new Dictionary();
foreach(string s in list)
{
int prevCount;
if (!counts.TryGet(s, out prevCount))
{
prevCount.Add(s, 1);
}
else
{
counts[s] = prevCount++;
}
}
Then counts contains the strings as keys, and their occurence as values.