Django is built so that you have to put logic in your view. The template is not supposed to contain "advanced logic".
Do the query in the view, send the results to the template.
return render(request, 'base.html', {'qobj': qobj, 'yes_count': qobj.answer_set.filter(value="Yes").count()})
Template:
{{ yes_count }}