conn = connections[Questionnaire.objects.db]
Questionnaire.objects.extra(select={'year': conn.ops.date_trunc_sql('year',
    'register'), 'month': conn.ops.date_trunc_sql('month', 'register')}
    ).values('year', 'month').annotate(yes_count=Sum(Case(When(satisfaction
    =True, then=1), output_field=IntegerField())), no_count=Sum(Case(When(
    satisfaction=False, then=1), output_field=IntegerField())))
Count choices in django