added persistence for query counts