Record number of processssed queries when exiting