Can i measure the motor rpm using pixhawk4?

I want to measure the motor rpm through a pulse single, i used the pixhawk4, is the hardware and firmware support that?

And i also want to use a fet to control the oil motor’s CDI power supply, just use the pixhawk4, what should i do?