Refactor to store queryset instead of count