title: How to join a table and count records in Rails 3?
body: <p>I have a <code>Collection</code> class which has many coins.
  I am trying to select collections which have more than two coins.
  Currently, I have no problem doing that through straight Ruby, but that's extremely inefficient.</p>
  
  <p>My current code:</p>
  
  <pre><code>collections = Collection.all.select { |c| c.coins.count &gt; 2 }
  </code></pre>
  
  <p>How do I achieve that through a <code>joins</code> call with Arel?</p>
  
  <p>Thanks!</p>