Hi,
If you are using cDAQ, Mark explain it well.
You can also use Measurement and Automation Explorer to test it (Test Panel).
There is also a great example to do that: Count Digital Events.vi
If you are using cRIO, you can check this example:
Counters - Rseries.vi and use the high Speed I/O on the FPGA to create a counter.
Regards.
Matthieu
National Instruments Switzerland