You have 4 counters. Use them for 4 of the 5. Use an interrupt for the 5th. Rising edge input event triggers an interrupt. In the interrupt, grab the microsecond tick time (MATH box TICKus() function) and use it and the last sample to calc the time, then calc the rate from the time. I'm out of town, but I'll be back Monday. I can throw it together when I get back.