so just use two sensors with a 90 degree phase angle between them - that gives direction, and if everything is equally spaced, four positions (1 line x 4 counts/line).

Sampling rate should be governed by the Nyqist theorem - you need to sample at least twice the frequency of interest.

Real world is buy some hardware - encoders from US Digital, Avago, and hundreds of others, and quadrature decoder chips (or implement in FPGA, etc). Actual quadrature decoders are based on the edge, not sampling, but of course the circuitry has to be fast enough to detect the edges.

[link|http://zone.ni.com/devzone/cda/tut/p/id/4763|Brief NI summary]
[link|http://www.fpga4fun.com/QuadratureDecoder.html|FPGA implementation of a quadrature decoder]

--Tony