added methods to count queries and  count queries time