title: Get row count of tableA depending on existence of a FK in tableB
body: <p>I want to get row count in <code>tableA</code> if and only if <code>rowA_x</code> does not have a <code>FK</code> pointing to <code>rowB_x</code> in <code>tableB</code>.</p>
  
  <p>tableA:</p>
  
  <pre><code>id | id_tableB
  </code></pre>
  
  <p>tableB</p>
  
  <pre><code>id | ...
  </code></pre>
  
  <p>So basically the rows in <code>tableA</code> should only be counted if the column <code>id_tableA</code> does not exist as <code>id</code> in <code>tableB</code>.</p>
  
  <p>Is there a <em>clean</em> way to do such counting. I have around ~500.000 rows.</p>