title: Django group by multiple fields
body: <p>I want to transform this SQL request into a Django view:</p>
  
  <pre><code>SELECT color, shape, eyes, count(1) FROM animals WHERE master_id = 1 GROUP BY color, shape, eyes 
  </code></pre>
  
  <p>In order to do that I've tried:</p>
  
  <pre><code>animals = Animals.objects.filter(id=1).values('color', 'shape', 'eyes').annotate(ct=Count('color'), dg=Count('shape'), br=Count('eyes'))
  </code></pre>
  
  <p>And then loop on the result to find the count for each one (not very optimized) and the result isn't good. That's group by as I want but doesn't care about the id.</p>
  
  <p>EDIT:</p>
  
  <pre><code>&lt;QuerySet [
      { 'color': brown, 'shape': blabla, 'eyes': toto, 'ct': 2 },
      { 'color': black, 'shape': blabla, 'eyes': toto, 'ct': 1 },
      { 'color': yellow, 'shape': xxxxx, 'eyes': ok, 'ct': 4 }
  ]&gt;
  </code></pre>
  
  <p>SECOND EDIT:</p>
  
  <p>If I try that:</p>
  
  <pre><code>Animals.objects.filter(
      master_id=1
  ).values('color', 'shape', 'eyes').annotate(
      ct=Count('id')
  ).order_by('color', 'shape', 'eyes')
  </code></pre>
  
  <p>I have this result without count:</p>
  
  <pre><code>&lt;QuerySet [
      { 'color': brown, 'shape': blabla, 'eyes': toto},
      { 'color': black, 'shape': blabla, 'eyes': toto},
      { 'color': yellow, 'shape': xxxxx, 'eyes': ok }
  ]&gt;
  </code></pre>
  
  <p>LAST EDIT:</p>
  
  <p>The Animal table doesn't have count or ct column but I need it in my result</p>