 <p>The easiest way to do this is the Linq using</p> <pre><code>var list = new[] { "a", "a", "b", "c", "d", "b" }; var grouped = list .GroupBy(s =&gt; s) .Select(g =&gt; new { Symbol = g.Key, Count = g.Count() }); foreach (var item in grouped) { var symbol = item.Symbol; var count = item.Count; } </code></pre>