Hello Shenzhengpib,
There is an example program that comes with LabVIEW called Meas Dig Frequency-Buffered-Cont-High Freq 2 Ctr.vi. This can be found in the Example Finder (Help Menu>>Find Examples) under Browse Hardware Input and Output>>DAQmx>>Counter Measurements>>Digital Frequency. Please let me know if you have any questions. Have a great day!
Sincerely,
Marni S.