Interpret a query against the given program.
Rename all of the variables in t to a unique name by appending
a unique count to the old name.
Counter used to produce unique names.