Fix the query log result count issue