function getNumMatches(fileList, queryExpr) {
    var i,
        matches = 0;
    for (i = 0; i < fileList.length; i++) {
        var temp = countNumMatches(getFileContentsForFile(fileList[i]), queryExpr);
        if (temp) {
            numFiles++;
            matches += temp;
        }
        if (matches > MAX_TOTAL_RESULTS) {
            exceedsMaximum = true;
            break;
        }
    }
    return matches;
}
function getNumMatches(fileList, queryExpr) {
    var i,
        matches = 0;
    for (i = 0; i < fileList.length; i++) {
        var temp = countNumMatches(getFileContentsForFile(fileList[i]), queryExpr);
        if (temp) {
            numFiles++;
            matches += temp;
        }
        if (matches > MAX_TOTAL_RESULTS) {
            exceedsMaximum = true;
            break;
        }
    }
    return matches;
}
function getNumMatches ( fileList , queryExpr ) { var i , matches = 0 ; for ( i = 0 ; i < fileList . length ; i ++ ) { var temp = countNumMatches ( getFileContentsForFile ( fileList [ i ] ) , queryExpr ) ; if ( temp ) { numFiles ++ ; matches += temp ; } if ( matches > MAX_TOTAL_RESULTS ) { exceedsMaximum = true ; break ; } } return matches ; }
Get the total number of matches from all the files in fileList
@param   {array} fileList  file path array
@param   {Object} queryExpr
@return {Number} total number of matches
Get the total number of matches from all the files in fileList
get num matches