Add a counter to count performed queries.

Update interface.