The below code can be used to count the number of male/female in the Profile

 Profile.objects.values('gender').annotate(gener_count=Count('gender'))