You are right, it's counting how many spaces it receives in a second, not the actual number of incoming strings... Is there a way I can just sense that a string is received and trigger something like a boolean, and just count how many times that boolean turns TRUE or something?
Sure, try to describe that trigger or boolean and find it. An example of typical messages would help but like I said a return followed by a space may work. Or you can get more fancy and try to find it using regular expressions, which I have less experience with but know is possible. Also instead of the simple search replace, you could have a while loop, that finds the search with more work but will be more flexible. Either can do something like "Find a string that starts with a space followed by a string".
I was trying to use a While loop to pulse a boolean light when it receives a string of any character, and just count how many times a second that light is pulsed. But I couldn't get it to work. Do you have an idea or an example on how to do this?