def METHOD_NAME(self):
    n_comparisons = (
        Comparison.objects.filter(poll=OuterRef("poll"), user=OuterRef("user"))
        .filter(Q(entity_1=OuterRef("entity")) | Q(entity_2=OuterRef("entity")))
        .annotate(count=Func("id", function="Count"))
        .values("count")
    )
    return self.annotate(n_comparisons=Subquery(n_comparisons))