Reduce the number of database query timeouts when rendering the counts on search result scope tabs
We found out from the discussion in gitlab-com/gl-infra/scalability#1079 (comment 577242760) that requests to SearchController#count often timed out. From the test and also the logs, it's shown the timeout issues are more likely associated with Basic Search when querying the database. This issue is created to explore the possible approach to deal with this situation.