If you want to reliably determine position from a shaft you must use quadrature, simple pulse
generation doesn't cope with change in direction, and specifically goes completely wrong if
the mechanical stop position happens to be on the boundary of a pulse then you get lots of
spurious counts from vibration and so forth.
Quadrature sensors are immune to this if counted properly, since only one signal changes at once
and every transition implies a direction.