title: How to make a query to get a model with an empty attribute
body: <p>I have a model <code>Foo</code> that <code>has_many</code> <code>Bar</code>.
  I want a query that returns all <code>Foos</code> that have no <code>Bar</code>, or empty.
  Then I want to apply count or length to see how many Foos doesn't have Bars.</p>
  <p>I tried:</p>
  <pre><code>Foo.where('bars.count = 0').count
  Foo.where('bars = []').count
  Foo.where('bars.count = ?', 0).count
  </code></pre>
  <p>All of them return a Postgresql error.</p>