Does Excel have a built-in function that will return the number of occurrences of a letter within a single cell -- a kind of "countif" but for single cell.

Say cell A1 contains "XXZ". Can Excel tell me that there are 2 X's and 1 Z?

I've built the brute-force equations to evaluate each single letter within the cell. I could define a function for myself. But I'm wondering if an easy, elegant function already exists to do this.

Thanks.