The invention provides a pedometer and a program. whenever an output signal of an acceleration transducer is detected to a reducing from an increasing(e.g. being a peak value), the peak value is compared with a first threshold value, and a time interval between the peak value and the detection timing of the previous peak value is compared with a second threshold value to judge whether to count the step number, and then, the detected peak value is compared with a third threshold value greater than the first threshold value, and a time interval between the peak value and the previous peak value is compared with a fourth threshold value representing a time shorter than the second threshold value to judge the action type of users(e.g. running, walking or other state). Under the situation of being judged as running or walking, the falling steep degree of a wave form after appearing a peak in an acceleration time waveform is estimated according to the judged result, and the step number is added up according to each action type.