 <p>You can create a List(Of String) e.g.</p> <pre><code>Dim arr As New List(Of String) </code></pre> <p>And inside of your loop collect your strings:</p> <pre><code>arr.Add(CurrentString) </code></pre> <p>After the loop <code>arr</code> would have all the strings. Then you can run a simple LINQ query:</p> <pre><code>Dim Summary = From a In arr Group By Name = a Into Group _ Select Name, Cnt = Group.Count() </code></pre> <p>This Summary will give you the counts. You can use it for example </p> <pre><code>For Each elem In Summary 'Output elem.Name 'Output elem.Cnt Next </code></pre> <p>For your example this will produce</p> <pre><code>Name = "Jane", Cnt = 3 Name = "Matt", Cnt = 4 Name = "Paul", Cnt = 1 </code></pre>