how to count the revolution of motor