I am making a simple program that takes a sentence(s) and counts up all of the letters in the given sentence(s). Now, I was wondering if anyone could write some source code because of my problem

I want an easier way to write a way to get letters besides using a huge if-then-else loop, such as "If char X == a or A, then add * to variable L, else if char X == b or B then..." so on and so forth (Yes, i didn't write that using C++ coding, just giving you the idea of what I would otherwise have to do)

If anyone could help, it would be appreciated