Kid.objects.distinct().filter(toy__name__icontains='star')
Pay attention to the distinct() method. This is necessary because the child may have several "star" toys, so without distinct() you will get duplicates in the query set.
If you want to filter children by the number of toys found when using aggregation :
Kid.objects.distinct().filter(toy__name__icontains='star') \ .annotate(toys_num=Count('toy')).filter(toys_num__gt=4)
source share