Walking: counting steps when walking back and forth in a circle
The step counter is usually not GPS based. Instead the accelerometer sensor of your phone is used. 

When walking for every step your body moves up and down a bit which can be easily measured by this sensor. Using the accelerometer instead of GPS has multiple advantages:


The accelerometer requires only very little battery
The accuracy is better - no need to define your step length
It works at location without GPS signal (indoor, staircase)