Moved function that gets length of search result list to utils module