Back Ticks Break Some Databases (for example PostgreSQL)

Added in `quote_table_name` to the counters (the existing code didn't work with Postgres).