Get 'popular categories' in django,Category.objects.annotate(num_books=Count('book')).order_by('num_books')