where and count queries working without db