Add `num_queries` and `memory_size` stats to percolate stats.

Related to #3883