How to improve this analog interface for only counting pulses through audio port
Check what the input impedance of the sound card is.  It may be that the signal will get significantly attenuated by the 22 k&Omega; in series.  A common input impedance for "line" inputs is 600 &Omega;, for example.

I'd start with 1 k&Omega; in series followed by just two back to back diodes to ground.  &plusmn;700 mV is still a substantial signal for line level audio, and totally overwhelming for a microphone input.

If you only have a microphone input, then add another resistor divider after the clipping diodes.  &plusmn;10 mV is a strong microphone signal.