ISPN-3497 getCountRowsSql() has wrong SQL syntax