title: How to group by over related model count in Django ORM
body: <p>Let's say I have the following models:</p>
  
  <pre><code>class Conversation(Model):
    ...
  
  class Message(Model):
    conversation = models.ForeignKey(Conversation)
  </code></pre>
  
  <p>The following code counts the number of messages for each conversation:</p>
  
  <pre><code>Conversation.objects \
              .filter(...) \
              .annotate(size=Count("message")) \
              .values("size")
  </code></pre>
  
  <p>and returns a query set of <code>{'size': 0}, {'size': 1}, {'size': 0}, {'size': 0}</code> etc.</p>
  
  <p>But how do I aggregate over the conversation sizes? That is, obtaining a result something like this: <code>(0, 3), (1, 1)</code>, where the first element in each pair is the conversation size and the second element is the number of conversations of this size?</p>