simplify count query
cleanup
rework quoteIdentifier method