Let $f$ be any function which assigns to each permutation an integer number, and for any two permutations $\sigma$ and $\tau$, $f(\sigma \tau) = f(\sigma)f(\tau)$. Then, $f$ is zero, or identically 1, or it is the sign function.
Solution
After reading the answer given by Hagen, I am writing the following which is what I got from his answer.
I would like to know if it is correct or not.
First, as Hagen showed, if $f(\sigma)$ is zero for any permutation, then it is zero function. So, assume that $f(\sigma)\neq 0$ for every $\sigma$.
Let $I$ be the identical permutation, and $\sigma_{ij}$ be the permutation which replaces $i$ with $j$ and vice versa. Then, we have
1 - $f(I) = 1$ (as Hagen showed).
2 - $\sigma^2_{ij}=I$, and so $f(\sigma_{ij}) = 1$ or $-1$ as $f(\sigma_{ij})$ is an integer number.
3 - Every permutation can be constructed as a sequence of $\sigma_{ij}$.
4 - If $f(\sigma_{ij}) = 1$, then for every permutation $\sigma$, $f(\sigma)$ is a multiplication of a number of $1$, and so is equal to $1$, and so $f$ is identically $1$.
5 - If $f(\sigma_{ij}) = -1$, then for every permutation $\sigma$, $f(\sigma)$ is $(-1)^m$, where $m$ is the number of simple permutations $\sigma_{ij}$ to construct $\sigma$, and therefore it is the $sgn$ function.
So, we are done.
If $f(\sigma)=0$ for any $\sigma$, then $f(\tau)=f(\sigma\sigma^{-1}\tau)=f(\sigma)f(\sigma^{-1}\tau)=0$ for all $\tau$. So assume $f(\sigma)\ne 0$ for all $\sigma$.
From $f(I)=f(II)=f(I)f(I)$, we conclude that $f(I)=1$ (we just excluded the other possibility $f(I)=0).
Let $\sigma$ be a transposition. As any other transposition $\tau$ is conjugate to $\sigma$, say $\tau=\phi^{-1}\sigma\phi$, we see that $f(\phi)f(\tau)=f(\phi\tau)=f(\sigma\phi)=f(\sigma)f(\phi)$ ans so $f(\tau)=f(\sigma)$. From $\sigma^2=1$ for transpositions, we conclude $f(\sigma)^2=f(\sigma^2)=f(I)=1$, i.e., $f(\sigma)=\pm1$.
Now use that the transpositions generate the group of permutations. As seen above, either $f(\sigma)=1$ for all transpositions and then by induction $f(\phi)=1$ for all $\phi$. Or $f(\sigma)=-1$ for all transpositions and then by induction $f(\phi)=\operatorname{sgn}(\phi)$ for all $\phi$.