While putting the capacitor between your signal and ground will git rid of any transients, it will also "round" out your signal. Your square wave provided by the encoder can be approximated by the sum:
y(t) = a_0 + sum(k=0...infinity, a_k*cos(k*f*t)) + sum(k=0...infinity, b_k*sin(k*f*t))
The capacitor has a frequency-depenent resitant (called reactance) which decreases with increasing frequency.
The reactance is:
X(f) = 1 / 2*PI*f*C
Where f is your frequency and C=1uF. What happens is the capacitor shorts the higher frequency harmonics to ground and makes your square waveform "ring" at the edges.
If this ringing causes you to swing high-and-low close enough to the switching point, then you could count pulses that really aren't there. What you really need is some sort of hysteresis to prevent this false switching. You should put this after the bypass capacitor and before the counter.
Also, another question is: What are the output levels of your encoder? The 383mV DC offset shouldn't affect a counter, but if your logic "high" voltage doesn't exceed about 2V then you might be hitting a region of metastability: where the counter randomly switches high/low.
Regards,
Chris_B