title: COUNT(*) in SQL
body: <p>I understand how count(*) in SQL when addressing one table but how does it work on inner joins?</p>
  
  <p>e.g.</p>
  
  <pre><code>SELECT branch, staffNo, Count(*)
  FROM Staff s, Properties p 
  WHERE s.staffNo = p.staffNo
  GROUP BY s.staffNo, p.staffNo
  </code></pre>
  
  <p>staff contains staffNo staffName</p>
  
  <p>properties contains property management details (i.e. which staff manages which property)</p>
  
  <p>This returns the number of properties managed by staff, but how does the count work? As in how does it know what to count? </p>