Amdocs interview question

write a code for counting the occurrence of digits from a string.