Changed CheckPendingMatches to getCount and modified to accept status as a parameter.