Fixed issue with query count=true