Using Millis with optical encoder

Try a faster baud rate - you may be filling the serial output buffer and blocking, causing you to miss 100.