A loop and an if can count only the letters you care about:
if
What number does it print?
Enter a whole number.