- enhanced sql count