'Return the number of times the given method was called with given
arguments.
:param name: Method name.
:param args: Positional arguments it was called with.
:param kwargs: Keyword arguments it was called with.
:return: Number of calls.'

def num_calls(self, name, *args, **kwargs):

    return self.call_count.get(pvector([name, pvector(args), pmap(kwargs)]), 0)
