Getting search matches count

You could run the cursor you get from SearchQuery.getCursor over the document and count matches.