xxxxxxxxxx
-- Excel VBA macro
Function CharacterInString(text As String, character As String) As Integer
CharacterInString = Len(text) - Len(Replace(text, character, ""))
End Function
-- for more example :
https://stackoverflow.com/questions/9260982/how-to-find-number-of-occurences-of-slash-from-a-strings