if (RPM < 7000)
module1.setDisplayToDecNumber(RPM,0, false); //Display RPM on TM1638
Hmm... This might be a minor thing, but why is there an conditional statement on the display command? You already are already imposing an upper limit of 9000 RPM by discarding pulses shorter than 3378 ?s due to your logic during the pulse detection. As currently written the code counts the pulses that indicate an RPM of 7000 to 8999 valid inputs but won't output these corresponding values to your display.