https://de.mathworks.com/help/matlab/supportpkg/arduinoio.motorcarrier.rotaryencoder.readcount.readcount.html
readCount - Read current count value from encoder connected to MKR Motor Carrier or Nano Motor...
This MATLAB function returns the current count value from the encoder.