def num_answers(user):
 return Answer.objects.filter(creator=user).count()

def num_answers ( user ) : return Answer . objects . filter ( creator = user ) . count ( )
returns the number of answers a user has .