add total_results method for search