Yes, like he said, Google Fit. Works great. Just got a fitbit charge 2 for Xmas, so I did an accuracy comparison during a recent walk. The pixel was in my left pocket, fitbit on my wrist. They were within 6 steps of each other. Over 2500 steps for that walk.
For example, I don't currently use Google Fit, but I noticed in the past that even when just sitting on the treadmill's front panel (when at the gym), it did a pretty good job of counting my paces. It is the rhythmic motion that it picks up, apparently.