title: Django ManytoMany filter exact list with duplicate items
body: <p>This is extension for the question <a href="https://stackoverflow.com/questions/40505500/django-manytomany-filter-exact-list">Django ManytoMany filter exact list</a></p>
  
  <p>Looks like accepted answer doesn't work when list contains duplicates.
  Is there any solution?</p>
  
  <p>Basically, I split sentence into tokens and want to search by that tokens.</p>
  
  <pre><code>class Sentence(Model):
      name = CharField()
  
  class Tokens(Model):
     token = CharField()
     sentence = ForeignKey(Sentence, related_name='tokens')
  </code></pre>
  
  <p>Suppose, I have the tokens <code>['che', 'farebbe', 'dalle', 'dalle']</code>. I want to find sentences that consist exactly of these tokens.</p>
  
  <pre><code>Sentence.objects.annotate(n=Count('tokens')).filter(tokens__name='che').filter(tokens__name='farebbe').filter(tokens__name='dalle').filter(n=4)
  </code></pre>
  
  <p>doesn't work. <code>n</code> is more than <code>4</code> (I guess, because of joins).</p>
  
  <p>If list of tokens doesn't have duplicates then everything is working fine.</p>