Hello thoo,
I would suggest taking a look at the Count Edges (Finite).vi in the LabVIEW Example Finder: Help » Find Examples » Hardware Input and Output » DAQmx » Counter Input. You can select how many edges to count in the Sample Clock function.
Does this help?
Cameron Schaefer
Applications Engineer
National Instruments