processing not reading serial data correctly??

Serial.println() takes your int, and converts it to a string. It sends the string to the serial port. It is sending '2', '4', '4', , . The Processing application is then reading the '2' (or 50 is the ASCII value). Since that is greater than 0, it then reads the '4' (52) and shows that. Then, it reads the '4', which is greater than 0, so it reads and shows the (13 in the ASCII table). Then, it reads the (10 in the ASCII table). Since that is greater then 0, it reads and shows the next value. Oops, there are not more values (so you get the -1).