title: Count the number of rows in a Django database : AttributeError
body: <p>I have database created by Django model, where idRecruteur is the fields of the table Offre.</p>
  
  <p>I need to count the number of rows where idRecruteur = 1.</p>
  
  <p>This is my "Offre" table code:</p>
  
  <pre><code>@python_2_unicode_compatible
  class Offre(models.Model):          
      titre = models.CharField(max_length=100)
      dateAjout = models.DateField(auto_now=False, auto_now_add=False)
      nature = models.CharField(max_length=50)
      duree = models.CharField(max_length=50)
      niveau = models.CharField(max_length=50)
      description = models.CharField(max_length=50)
      salaire = models.FloatField(null=True, blank=True)
      idRecruteur = models.ForeignKey(Recruteur, related_name="Offre", on_delete=models.CASCADE)
      def __str__(self):
          return "Offre: {}".format(self.title)
  </code></pre>
  
  <p>and this is my queryset:</p>
  
  <pre><code>class OffresparEntrepriseViewSet(ModelViewSet):
      queryset = Offre.objects.filter(idRecruteur=1).count()
      serializer_class = OffreSerializer
  </code></pre>
  
  <p>I get the error " AttributeError: 'int' object has no attribute 'model' "</p>
  
  <p>Any ideas what I am doing wrong?</p>