Combining multiple aggregations with annotate() will yield the wrong results because joins are used instead of subqueries
...
For most aggregates, there is no way to avoid this problem, however, the Count aggregate has a distinct parameter that may help
https://github.com/dabapps/django-rest-framework-serialization-spec/issues/27
By default use
distinct=True
onCount()
so that multiple Counts don't interfere with each otherAs per https://docs.djangoproject.com/en/2.2/topics/db/aggregation/#combining-multiple-aggregations: