clone query on count