title: How should we count the number of distinct pairs / tuples in SQL?
body: <p>Suppose the schema is like this:</p>
  
  <pre><code>First Name | Last Name | Age | ID
  ====================================
  John         Smith       18    123
  John         Smith       21    234
  John         Smith       19    123
  Cathy        Zhang       20    144
  Cathy        Zhang       20    144
  Jackie       Chan        35    456
  </code></pre>
  
  <p>Suppose I want to count the number of distinct pairs after each (first name, last name). So that the output should be:</p>
  
  <pre><code>John         Smith       3
  Cathy        Zhang       1
  Jackie       Chan        1
  </code></pre>
  
  <p>I think I can first do:</p>
  
  <pre><code>SELECT FirstName,LastName,Age,ID,COUNT(*);
  </code></pre>
  
  <p>And then</p>
  
  <pre><code>SELECT FirstName,LastName,COUNT(*)
  </code></pre>
  
  <p>Is there a better approach?</p>