Like you said, a for loop works:
var count = 0
for character in "Potato":
if character == "o":
count += 1
print(count)
Or you can use a regex. I recommend learning about regexes if you want to do more advanced string processing.
var regex = RegEx.new()
regex.compile("o")
var count = regex.search_all("Potato").size()
print(count)
I hope this helps!