Added query count to debug stats

Signed-off-by: Tom Wright <tom@inflatablecookie.com>