I think you need to interpret the movement. That is, you need to read the value from the sensor and determine what happened based on previous values. If these values indicate the movement is still going on, you do not increment the count. When the value plus some hysteresis indicates it has turned around, increment the count. Or something like that anyway.
Noise alone will cause the sensor to jitter and give you fluctuating values. You must filter them in some way. The previous paragraph is really nothing more than an overblown filter. Other types of filters may do the same job. Perhaps just an average filter then compute the delta and use the sign of it to operate the counter.
You might also want to study how other pedometers and the like actually work. This may give you some insights into how to make yours.
Hope this helps.