How do I increment a global variable in a function?

I was actually looking at Serial Input Basics - updated yesterday. I was a little confused on how to go about setting it to no line ending. Input from my keypad seems to be working just fine. it's the input from the computer that is giving me problems.