DJANGO QUERYSET GROUP par décompte

 from django.db.models import Count

 result = Books.objects.values('author')
                       .order_by('author')
                       .annotate(count=Count('author'))
Trained Tuna