Counting teeth, and skipping pulses

dhenry:
It is fairly difficult to do with the gates.

I would use a 8pdip avr and program it for that.

Actually its impossible to do with just gates - you need at least a monostable or timer or equivalent to provide elapsed time information - you need to distinguish the starting pulse of a train of pulses based on the delay since the last pulse.