Is there a command you can use to count specific characters in a string?
The String class doesn't have a method to do that. You'll need to loop through the index values of the string examining each character.