Pergunta de entrevista da empresa SLB

Technical question: count how many times a char shows in a given string