twin processor arduino ?

Gadget999:
i will try pulsein

pulsein() doesn't count number of pulses, it tells you how long they are.

nb. Counting number of pulses and getting the length of pulses can all be done in hardware, just don't expect the standard Arduino functions to do it for you...