incrementMotorCounter refactor