title: Count, order desc and select top 5
body: <p><strong>SQL Server 2012</strong></p>
  
  <p>We have a table, like such:</p>
  
  <pre><code>ticket, type
  ------------------
  1234, hardware
  1543, software
  8859, network
  5832, hardware
  4900, hardware
  8403, software
  7859, network
  4332, telephone
  8721, database
  </code></pre>
  
  <p>Our goal is to count up all tickets belonging to each type (so in this case the result should be 3 hardware, 2 software, 2 network, 1 telephone and 1 database ticket(s)), order them desc and select the first 5 resulting rows.</p>
  
  <p>We're trying to determine the top 5 "popular" or most seen ticket types (and how many there are).</p>
  
  <p>I've got the counting portion down but not sure how to proceed with ordering desc and selecting the first 5.</p>
  
  <p>Thank you!</p>