getSearchResultCount refactor