title: How to count occurrences of a column value in SQL?
body: <p>I have a table of students:</p>
  
  <pre><code>id | age|num
  -------------
  0  | 25| 10
  1  | 25| 5
  2  | 23| 5
  </code></pre>
  
  <p>I want to query for all students, and an additional column that counts how many students are of the same age:</p>
  
  <pre><code>id | num | age | agecount|numcount
  -------------------------------------
  0  | 10 | 25  | 2       |1
  1  | 5  | 23  | 1       |2
  </code></pre>
  
  <p>What's the most efficient way of doing this? if there's a better way**. Is there?</p>