http://www.chiefdelphi.com/forums/pa...le&paperid=272
I have included a link to a white paper written by Daniel Katanski which is an excellent place to start learning about this capability.
You say you want to use interrupts to increment a rotation count, but then you describe an analog measurement. The interrupts are digital inputs, typically a pulse and the pic controller can be configured to generate an interrupt on rising edge, falling edge, and (for some inputs) both edges. One method to apply this to determine the displacement of the machine would be to use a encoder on one of the drive train shafts that would generate a specific number of pulses for each revolution of the shaft. The interrupt routine would accumulate the number of pulses from a starting point and this would be directly related to displacement of the machine.