title: sql how to get a count based on two columns
body: <p>I'm pretty new to sql and I'm just wondering how I can get a count based on the values of two columns. Here's an example:</p>
  
  <pre><code>Sex |  age
  
   M  |  7
  
   M  |  5
  
   F  |  5 
  
   M  |  7
  </code></pre>
  
  <p>The resulting table would have an extra column that is the count of how many M or F are a certain age. So in this case it would be this:</p>
  
  <pre><code>Sex | age  | Count
  
   M  |  7   |  2
  
   M  |  5   |  1
  
   F  |  5   |  1
  </code></pre>
  
  <p>Any help would be great. Thanks!</p>