Fixes the query result counting test.