Manual:$wgCountTotalSearchHits

Details
Set to true to have the default MySQL search engine count total search matches to present in the Special:Search UI.

This could however be slow on larger wikis, and is pretty flaky with the current title vs content split. Recommend avoiding until that's been worked out cleanly; but this may aid in testing the search UI and API to confirm that the result count works.