Passing count in recursive verification methods by reference for memory optimization