Fun with Rotary Encoders

I sense there is a hilarious joke here somewhere I'm not picking up on.

What is the language called? Do you see an operator in the name that you are not using?

Also I have no idea why it wont go under 48.

  Serial.println(count);

Sends a character string like "3" to the serial port.

  if ( myPort.available() > 0) {  // If data is available,
     val = myPort.read();

Reads one byte from the serial port, as an int. The three bytes you sent were '3'. '\n', and '\r'. The ASCII values for these characters are 51, 10, and 13. The ASCII value for '0' is, not surprisingly, 48.

You need to use Serial.write() on the Arduino side, not Serial.println(), and you need to make count a byte, not an int.

This will result, when count is 3, in 3 being sent to the serial port, not "3".