title: sql count how many times 2 values share a third value
body: <p>i have 2 tables which i can join on a common id.  however, one table has people names and the other table has company names.</p>
  
  <p><a href="http://i.stack.imgur.com/aZwcc.png" rel="nofollow"><code>people table</code></a></p>
  
  <p><a href="http://i.stack.imgur.com/7b1ha.png" rel="nofollow"><code>company table</code></a></p>
  
  <p>how can i produce a query result where I can get a count of how many times each person shares the same id as each company?</p>