title: Django QuerySet ordering by number of reverse ForeignKey matches
body: <p>I have the following Django models:</p>
  
  <pre><code>class Foo(models.Model):
      title = models.CharField(_(u'Title'), max_length=600)
  
  class Bar(models.Model):
      foo = models.ForeignKey(Foo)
      eg_id = models.PositiveIntegerField(_(u'Example ID'), default=0)
  </code></pre>
  
  <p>I wish to return a list of <code>Foo</code> objects which have a reverse relationship with <code>Bar</code> objects that have a <code>eg_id</code> value contained in a list of values. So I have:</p>
  
  <pre><code>id_list = [7, 8, 9, 10]
  qs = Foo.objects.filter(bar__eg_id__in=id_list)
  </code></pre>
  
  <p>How do I order the matching <code>Foo</code> objects according to the number of related <code>Bar</code> objects which have an <code>eg_id</code> value in the <code>id_list</code>?</p>