log query count in console