Lets say there is an experiment in which balls numbered $1,...,n$ are distributed at random in $n$ boxes, also numbered $1,...,n$ so that each box has exactly one ball. Thus, the total number of possible outcomes is $n!$. Let $S_n$ be the number of matches; a match occurs when the ball and the box containing it have the same number.
I want to find $E(S_n)$ and $Var(S_n)$. I'm having troubles identifying the problem mathematically.