title: Django count specific items of a many-to-one relationship
body: <p>I have a Django app where users post messages and other users can vote the answers up or down, very similar to SO. I'm having an issue trying to get the "thumbs up" and "thumbs down" counts from within the template and I'm hoping someone can help me. The PostVote is a many-to-one relationship with the Post class. Here is what my model looks like:</p>
  
  <pre><code>class Post(models.Model):
      account = models.ForeignKey(Account)
      message = models.CharField(max_length=1024)
      timestamp = models.DateTimeField('post timestamp')
  
  class PostVote(models.Model):
      post = models.ForeignKey(Post)
      account = models.ForeignKey(Account)
      vote = models.CharField(max_length=16, choices=VOTE_CHOICES)
      timestamp = models.DateTimeField('vote timestamp')
  </code></pre>
  
  <p>Here is how I'm getting my posts:</p>
  
  <pre><code>posts = Post.objects.all().order_by('-timestamp')[:10]
  </code></pre>
  
  <p>My template looks roughly like:</p>
  
  <pre><code>{% for post in posts %}
  &lt;div&gt;Thumbs up count: {{ WHAT_HERE }}&lt;/div&gt;
  &lt;div&gt;Thumbs down count: {{ WHAT_HERE }}&lt;/div&gt;
  {% endfor %}
  </code></pre>
  
  <p>How can I get the counts in there? I'm sure it involves 'annotate' somehow, but I'm having a difficult time coming up with this one. Any help would be greatly appreciated!</p>