Hello Cristiano,
I understand your frustration but please avoid using the developer mailing list
as a second tier support channel. I suggest you try the IRC #django channel if
you need to want to get faster support.
What's happening here is that annotate() really means "select this field" while
in your other case you use a lookup (summary__icontains) which are only going to
be added to the WHERE clause of your query.
I'm not sure why you are annotating your queryset without referring to it in
a filter clause later on but the ORM cannot simply ignore it when you are
performing your `count()` because some annotations could interfere with grouping
somehow.
There is an open ticket[0] to add support for an `alias()` method that would
allow the ORM to clear/ignore the specified expressions if it's not referenced
in the query.
In the mean time I think the best approach would be to avoid annotating the
queryset if your don't need to reference the score.
Cheers,
Simon
[0]
https://code.djangoproject.com/ticket/27719