Can you provide the circuit that is used with this sketch? How fast is your shaft turning?
None of the variables used in the main program and the interrupt handler are declared volatile as they should be.
Using a timer interrupt to read the reed switch once a millisecond is quite a bit extraordinary. There are more efficient ways to get that information and doing such a lot of calculations inside the interrupt handler should be avoided.
Please use code and not quote tags next time you post code (do you see the smiley in the code, that and worse things happen when you don't use code tags).