fix issue with checking counters in binary folding (#106575)
We were incorrectly determining whether we had found a foldable op.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/106575
Approved by: https://github.com/XiaobingSuper, https://github.com/yanboliang
ghstack dependencies: #106471