title: Finding object count where a field is unique in Django
body: <p>I have a model that is something like this:</p>
  <pre><code>class Input(models.Model):
          details = models.CharField(max_length=1000)
          user = models.ForeignKey(User)
  
  class Case(Input):
      title  = models.CharField(max_length=200)
      views = models.IntegerField()
  
      class Argument(Input):
          case = models.ForeignKey(Case)
          side = models.BooleanField()
  </code></pre>
  <p>A user can submit many arguments, per case.  I want to be able to say how many users have submitted <code>side=true</code> arguments.</p>
  <p>I mean if 1 user had 10 arguments and another user had 2 arguments (both <code>side=true</code>)
  I'd want the count to be 2, not 12.</p>
  <h3>Update:</h3>
  <p>I am using these methods on the Case object:</p>
  <pre><code> def users_agree(self):
          return self.argument_set.filter(side=True).values('user').distinct()
      def users_disagree(self):
          return self.argument_set.filter(side=False).values('user').distinct()
  </code></pre>
  <p>My template code calls <code>count()</code> on them.</p>