Modified getNumberOfMatches()