Pergunta de entrevista da empresa Barclays

count occurrences of character in string.