def METHOD_NAME(patron_pid, status=None):
    """Get patron transactions count linked to a patron.
    :param patron_pid: the patron pid being searched
    :param status: (optional) transaction status filter,
    """
    query = _build_transaction_query(patron_pid, status)
    return query.source().count()