title: Getting count of each item
body: <p>I have the following query</p>
  
  <pre><code>Select count(*) as TotalCount from ABC where ID in (1,3,6)
  </code></pre>
  
  <p>The problem here is that it gives me the total count of 1,3 and 6. But I would like to get the count for each  ID, something like shown below:</p>
  
  <pre><code>TotalCount, ID
  6,          1
  2,          3
  5,          6 
  </code></pre>
  
  <p>Kindly let me know the SQL Server query for achieving this. I wouldn't prefer to use Temp tables.</p>