Counting involving equivalence classes and languages
If you look at two strings in your example $abba$ and $babbb$, they are composed of exactly the symbols from the set $\{a,b\}$, where each symbol appears at least once. So you can reduce  the counting problem in your question to counting the number of subsets of $\{a,b,c,d\}$. Note that one equivalence class would be $\{\lambda\}$ where $\lambda$ denotes the empty string. How many subsets does $\{a,b,c,d\}$ have?