title: mongoid ordering problem
body: <p>I have been using mongoid for storing data. I have a scenario where I have to sort the parents according the number of dependents they have. My model is simple:</p>
  
  <p>Parent model references_many dependents <code>stored_as =&gt; array</code><br>
  Dependent model reference_many parents <code>stored_as =&gt; array</code></p>
  
  <p>I don't want to loop through the parents, find the number of dependants, store them in an array and dump them into my view.</p>
  
  <p>What I need is to sort the parents according to number of dependants with just one query.
  Is that possible?</p>
  
  <p>Thanks.</p>