elementary problem in combinatorics Let $X=\{1,2,3,4,5,6,7,8,9,10\}$ and $R$ be a set defined by $$\{(x,y)\in X\times X: \text{$x$ and $y$ have the same remainder when divided by $3$}\}$$  Then what's the numbers of elements in $R$?  My approach is
$\bar{0} = \{3,6,9\}$ so we can get $2!\binom{3}{2}$ numbers of elements
$\bar{0}= \{1,4,7,10\}$ we get $2!\binom{4}{2}$ elements
$\bar{2} = \{2,5,8\}$ we get $2!\binom{3}{2}$ elements
Now counting all the elements like $(1,1),(2,2)$ and so on..., I get the answer $34$.  Is it correct? 

Your answer is correct.
$R\subset X\times X$ can be recognized as an equivalence relation. As comes forward in your question its equivalence classes are $\{3,6,9\}$, $\{1,4,7,10\}$ and $\{2,5,8\}$.
Then: $$R=\left[\{3,6,9\}\times\{3,6,9\}\right]\cup\left[\{1,4,7,10\}\times\{1,4,7,10\}\right]\cup\left[\{2,5,8\}\times\{2,5,8\}\right]$$
And its cardinality is $3^2+4^2+3^2=34$
