title: LINQ Query to count by distinct category / subcategory
body: <p>I have a table, generated from a LINQ query on a datatable, which has subcategory and category fields:</p>
  
  <pre>
  Name...........Category.........Subcategory  
  Kiss...........Rock.............Glam Rock  
  Metallica......Rock.............Hard Rock  
  Bon Jovi.......Rock.............Soft Rock  
  Slade..........Rock.............Glam Rock  
  Meatloaf.......Rock.............Soft Rock  
  Wilee..........Dance............Grime  
  Mgmt...........Dance............Nu Rave  
  Dizee..........Dance............Grime  
  </pre>
  
  <p>The LINQ query I am using to generate this table is:</p>
  
  <pre><code>var qCategory = from c in dtCategory.AsEnumerable()
              select new {
                  Artist = c.Field&lt;string&gt;("Artist"),
                  Category = c.Field&lt;string&gt;("Category"),
                  Subcategory = c.Field&lt;string&gt;("Subcategory")
               };
  </code></pre>
  
  <p>Now I want to get a count of each category/subcategory pair. e.g. for the above example I want to return:</p>
  
  <pre>
  Category............Subcategory.......Count  
  Rock................Glam Rock.........2  
  Rock................Soft  Rock........2   
  Rock................Hard Rock.........1  
  Dance...............Grime.............2  
  Dance...............Nu Rave...........1  
  </pre>
  
  <p>How can I acheive this?</p>