title: LINQ: Order By Count of Unique Items in List<string>
body: <p>I have a list of ids properly stored in a List&lt;>.  I now need to Group this list and get a count of the number of occurrences sorted descending.</p>
  
  <p>Example:</p>
  
  <pre><code>List&lt;string&gt; aryIDs = new List&lt;string&gt;;
  aryIDs.Add("1234");
  aryIDs.Add("4321");
  aryIDs.Add("3214");
  aryIDs.Add("1234");
  aryIDs.Add("4321");
  aryIDs.Add("1234");
  </code></pre>
  
  <p>Would Produce:</p>
  
  <pre><code>"1234", 3
  "4321", 2
  "3214", 1
  </code></pre>
  
  <p>This would be easy in TSQL, but I would like to avoid the server roundtrip, unnecessary tables, etc. if possible.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Update:  The VB.NET conversion for Ralph Shillington's answer below:</p>
  
  <pre><code>Dim result = From id In aryIDs _
                       Group id By id Into Group _
                       Order By Group.Count() Descending _
                       Select id, Count = Group.Count()
  
  result.Dump()
  </code></pre>