Use resultSet array length for total match count

This fixes #8726.
Seems like this is unneeded -- `expectHighlightedMatches([])` does this same check and is actually more thorough since it verifies the actual highlights in the DOM too.