Counting Pulses with Digital Input

10 Khz you can do with attachINterrupt() and use millis() or micros() to calculate the frequency ...