title: Django Queryset Count
body: <p>My model:</p>
  
  <pre><code>class Device(models.Model):
      build = models.CharField()
      name = models.CharField()
  </code></pre>
  
  <p>How do I build my queryset so I can get the count of objects with different builds.</p>
  
  <p>For example if there were two builds 'build 1' and 'build 2', I would want an output that would tell me </p>
  
  <pre><code>build 1 = 3
  build 2 = 4
  </code></pre>
  
  <p>EDIT: Tried the following:</p>
  
  <pre><code>Device.objects.values('build').annotate(count=Count('pk'))
  </code></pre>
  
  <p>the output is:</p>
  
  <pre><code>[{'build': u'wed build'}, {'build': u'red build'}, ... ]
  </code></pre>