How do I count the amount of words in a string? I'm using a string to store integers (maximum of 6) for reference. The numbers in the string will not exceed 5 digits each, and are seperated by a space, although this can be changed to something else. I've searched a lot of sites but found nothing of use.