Quad Encoder

I was teaching my students how to use a quad encoder as a way to count rotations for an elevator. It worked great going in one direction. However, when the axle would change direction the encoder would reset to 0 and start counting negative. (Going up we went from 0, 300, 600, but going down always reset to 0 and starting counting negative from any position).

Is there a way to make the quad encoder keep a fixed count were it doesn’t reset during a program?

Thanks