A lap counter for use by a swimmer, has a case for attaching to the
swimmer, and a compass sensor housed in the case for providing an output
signal which changes between opposite directions along which the swimmer
swims back and forth. An operating circuit includes a processor
programmed to distinguish the change in the output signal of the compass
sensor between the opposite directions to identify a reversal in
direction of swimming by the swimmer and to count laps, each lap being
based on two successive reversals in direction. The processor may also be
programmed to distinguish the change in the compass sensor output signal
to detect a rise above an upper threshold and a subsequent fall below a
lower threshold, or vice versa, to identify, a wave in the output signal
that represents a swimming stroke of the swimmer and to count the
strokes.