How many times a character occurs in a string.
For example: I have a string "1.2.3.4" and I want a function to return the value 3 because "." occurs 3 times in the string.

Does anyone have such a function?