title: SQL count field that matches criteria from another field
body: <p>I have a field of account numbers that tie into account ID's.
  how would I get a total count of all the ID's paid with account numbers(and add in the new column into my temp table.</p>
  
  <pre><code>for the sake of sanity
  ID = ID
  ACCOUNT NUMBER = ACCT
  COUNT = COUNT (NEW COLUMN) 
  
  ID |ACCOUNT NUMBER (GIVEN)   
  1  |123           
  1  |124           
  2  |125           
  3  |126           
  3  |127           
  3  |128           
  3  |129           
  4  |130           
  5  |131           
  5  |132           
  5  |133           
  5  |134           
  5  |135           
  5  |136           
  5  |137           
  
  
  ID |ACCOUNT NUMBER|COUNT  
  1  |123           |2     
  1  |124           |2     
  2  |125           |1     
  3  |126           |3     
  3  |127           |3     
  3  |128           |3     
  3  |129           |3     
  4  |130           |1     
  5  |131           |7     
  5  |132           |7     
  5  |133           |7     
  5  |134           |7     
  5  |135           |7     
  5  |136           |7     
  5  |137           |7     
  </code></pre>