def filter_count(request, values={}):
    """Performs a search and returns the resulting count of runs.

    :param dict values: a mapping containing criteria. See also
        :meth:`TestRun.filter <tcms.xmlrpc.api.testrun.filter>`.
    :return: total matching runs.
    :rtype: int

    .. seealso::
       See examples of :meth:`TestRun.filter <tcms.xmlrpc.api.testrun.filter>`.
    """
    return distinct_count(TestRun, values)