Counting involving equivalence classes and languages Let $\Sigma$ be the alphabet $\{a, b, c, d\}$ and let $R$ be the following relation on $\Sigma^*$: $R(x, y)$ is true if every letter in string $x$ also occurs in $y$, and every letter in string $y$ also occurs in $x$.  (For example, $R(abba, babbb)$ is true and $R(abcb, cbbcb)$ is false.)  How many (non-empty) sets are in the partition of $\Sigma^*$ corresponding to $R$?  (That is, how many equivalence classes does R have?)

Any help will help.
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?