How does heart rate counters work?

These work by picking up electrical signals that are released when the heart muscle cells contract.