1👍
✅
Thing.objects.annotate(cat_count=Count('id', filter=Q(categories__in=[2, 3]))).\
filter(cat_count__gte=2).values('id', 'cat_count')
Try it. cat_count__gte=2
because the two numbers are 2, 3.
Source:stackexchange.com