For some $\pi\in S_n$, $\mathrm{sgn}(\pi) = (-1)^r$ where $\pi = \tau_1\tau_2\ldots\tau_r$ as a product of transpositions. This is well defined (although this is non-trivial to check).
(A) A cycle of length $k$ can be written as a product of $k-1$ transpositions - e.g. $(1 2 3 \ldots k) = (1 2)(2 3)\ldots(k-1\, k)$. If $\pi$ is a product of $z$ cycles of length $k_1,\ldots,k_z$ respectively then $\pi$ is a product of $$\sum_{i = 1}^z(k_i-1) = \left(\sum_1^zk_i\right) - z = n-z$$ transpositions and hence $\textrm{sgn}(\pi) = (-1)^{n-z}$.
(B) Check that $\sigma : S_n \rightarrow \{\pm 1\}$ where $\sigma(\pi) = \textrm{sgn}(\pi)$ is a well defined homomorphism. Then $A_n = \{\pi\in S_n : \textrm{sgn}(\pi) = 1\}$ is precisely the kernel of $\sigma$ and hence is a subgroup of $S_n$.
(C) Use the $\sigma$ from (B) and the first ismorphism theorem to show that $|A_n| = \frac{|S_n|}{2}$.