6. $65 X=\{0, a, b, c\}$ and $M(X)=\{f \mid f: X \rightarrow X\}$ is the set of all functions from $X$ to itself. Define the addition operation $\oplus$ on $X$ as follows:
\begin{tabular}{|c|c|c|c|c|}
\hline$\oplus$ & 0 & $a$ & $b$ & $c$ \\
\hline 0 & 0 & $a$ & $b$ & $c$ \\
\hline$a$ & $a$ & 0 & $c$ & $b$ \\
\hline$b$ & $b$ & $c$ & 0 & $a$ \\
\hline$c$ & $c$ & $b$ & $a$ & 0 \\
\hline
\end{tabular}
(1) If
$$\begin{array}{l}
\quad S=\{f \in M(X) \mid f((x \oplus y) \oplus x)=(f(x) \oplus f(y)) \oplus f(x), \\
\forall x, y \in X\},
\end{array}$$

determine the number of elements in $S$.
(2) If
$$I=\{f \in M(X) \mid f(x \oplus x)=f(x) \oplus f(x), \forall x \in X\}$$

determine the number of elements in $I$.
[Solution] (1) From the addition operation table, for $x \in \{a, b, c\}$, we have
$$\begin{array}{l}
0 \oplus x = x \oplus 0 = x \\
x \oplus x = 0 \\
b \oplus a = a \oplus b = c, \quad c \oplus a = a \oplus c = b \\
c \oplus b = b \oplus c = a .
\end{array}$$

Therefore, we have
$$x \oplus y = y \oplus x, \forall x, y \in X$$

And it is easy to verify that
$$(x \oplus y) \oplus x = y, \forall x, y \in X$$

In fact, if $y = 0$, then
$$(x \oplus y) \oplus x = (x \oplus 0) \oplus x = x \oplus x = 0 = y .$$

If $y \neq 0$ but $x = 0$, then
$$(x \oplus y) \oplus x = (0 \oplus y) \oplus 0 = y \oplus 0 = y .$$

If $y \neq 0$ and $x \neq 0$, let $z = \{a, b, c\} - \{x, y\}$, then $(x \oplus y) \oplus x = z \oplus x = y$.
Therefore, (1) holds.
Since $\forall x, y \in X$, we have $f(x), f(y) \in X$, so by (1) we get
$$(f(x) \oplus f(y)) \oplus f(x) = f(y)$$

Therefore,
$$S = M(X)$$

But
$$|M(X)| = 4^4 = 256$$

Hence,
$$|S| = 256$$

That is, the number of elements in $S$ is 256.
(2) Since
$$\begin{array}{l}
f(x \oplus x) = f(0) \\
f(x) \oplus f(x) = 0
\end{array}$$

We have
$$I = \{f \in M(X) \mid f(0) = 0\}$$

Thus,
$$|I| = 4^3 = 64$$

That is, the number of elements in $I$ is 64.