title: How to count rows that have the same values in two columns (SQL)?
body: <p>I am sure there must be a relatively straightforward way to do this, but it is escaping me at the moment.  Suppose I have a SQL table like this:</p>
  
  <pre><code>+-----+-----+-----+-----+-----+
  |  A  |  B  |  C  |  D  |  E  |
  +=====+=====+=====+=====+=====+
  |  1  |  2  |  3  | foo | bar | &lt;&lt; 1,2
  +-----+-----+-----+-----+-----+
  |  1  |  3  |  3  | biz | bar | &lt;&lt; 1,3
  +-----+-----+-----+-----+-----+
  |  1  |  2  |  4  |  x  |  y  | &lt;&lt; 1,2
  +-----+-----+-----+-----+-----+
  |  1  |  2  |  5  | foo | bar | &lt;&lt; 1,2
  +-----+-----+-----+-----+-----+
  |  4  |  2  |  3  | foo | bar | &lt;&lt; 4,2
  +-----+-----+-----+-----+-----+
  |  1  |  3  |  3  | foo | bar | &lt;&lt; 1,3
  +-----+-----+-----+-----+-----+
  </code></pre>
  
  <p>Now, I want to know how many times each combination of values for columns A and B appear, regardless of the other columns.  So, in this example, I want an output something like this:</p>
  
  <pre><code>+-----+-----+-----+
  |  A  |  B  |count|
  +=====+=====+=====+
  |  1  |  2  |  3  |
  +-----+-----+-----+
  |  1  |  3  |  2  |
  +-----+-----+-----+
  |  4  |  2  |  1  |
  +-----+-----+-----+
  </code></pre>
  
  <p>What would be the SQL to determine that?  I feel like this must not be a very uncommon thing to want to do.</p>
  
  <p>Thanks!</p>