title: How to count the number of groups returned by a group by?
body: <pre><code>select count(*) as count from table
  group by foreign_id order by count 
  </code></pre>
  
  <p>This returns a number of matches for each foreign id.  However what im looking for is to summarise the results.</p>
  
  <p>So the result would be:</p>
  
  <pre><code>10 results grouping 1 elements
  5  results grouping 2 elements
  7  results grouping 7 elements
  </code></pre>