heres a program i made to count numbers in random intervals. I use it to train kata for karate.