In query when total is not needed, count statement does not need to be checked.