Why is this treated differently from `start_time` which is part of the actual parameters of the query?
The `table` one I can see but this count should be part of the `cursor.execute(query, (start_time, start_time, count))` IMHO.
So this line should be `%%s' which means that psycopg2 will know to automatically treat it as an int. No?