Greetings Amnon-g,
There are actually example programs online and programs that ship with LabVIEW 7.0 that show you how to configure a counter on a NI 6601 for encoder measurements and event counting. The NI 660x devices are not yet supported by NI-DAQmx but you can still use Traditional NI-DAQ to program the 6601.
If you search for examples in LabVIEW and go to Hardware Input and Output>>Traditional DAQ>>Counters>>NI-TIO you will find all of the examples that will work with the NI 6601 device. For example, the 'Count Edges (NI-TIO) VI' shows you how to configure a counter on the 6601 to count digital edges.
The example program linked below shows how to configure a counter on the NI 6601 to take encoder measurements.
NI-TIO: Measuring the Position of an
Encoder
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3EDFD56A4E034080020E74861&p_node=DZ52329
I hope this helps. Let me know if you have any additional questions.
Regards,
Todd D.
NI Applications Engineer