Then the OP should say that
Perhaps the OP didn't articulate it well, but it's implied if you want to know the current match and how many total matches, that you have to search the whole document first to know those values.
And sure totally redesigning how search works will be fine
Might not be a huge change, most of the code already exists to search/mark the whole document and to do incremental matches.