What is the frequency of your Gate signal? Due to the source time base limitation, the gate signal must have a pulse width of at least (1 / source frequency). For example, if using the time base of 10 kHz as the source, the gate pulse width must be greater that 100us in order to register a count. Since your source signal is not periodic, I would recommend a gate signal of much less than 5 kHz.
Do you get the same behavior if you use a different counter?
Here is a
link that has more information on this error. You may have a noisy source signal.
Russell G.
Applications Engineer
National Instruments