As long as power is on, a bidirectional counter in the printer's microprocessor keeps track of print-head position