
Larry C. answered 03/27/19
Computer Science and Mathematics professional
The assumption is that a 'word' is a contiguous series of upper and lowercase characters. Anything else is a divider between words.
wordCount = 0
isWord = false
index = 0 if language 0-based, 1 if not
while index < character count (- 1 if 0-based)
if characters(index) is not an upper or lowercase character
isWord = false
else
if not isWord
isWord = true
wordCount++
index++
end while