This is a very simple way to count DigitalIn rising by using Ticker Interrupts.

Dependencies:   mbed

no such method: docs