A permutation $\sigma$ is a bijection from a finite set to itself. Here, it looks like we should think of $S_n\ni\sigma:\{1,2,\ldots,n\}\to\{1,2,\ldots,n\}$. Now the definitions are clearer: $\sigma$ maps numbers to numbers. You want to count the number of elements that are sent to numbers less than themselves, the number that are sent to themselves, and the number that are sent to numbers greater than themselves.
For example, if $\sigma = (1)(234)(5)(67)$, then we have the following: $\sigma(1)=1,\ \sigma(2)=3,\ \sigma(3)=4,\ \sigma(4)=2,\ \sigma(5)=5,\ \sigma(6)=7,\ \sigma(7)=6.$ The numbers sent to themselves are $1,5$, the number sent to numbers less than themselves are $4,7$, an the number sent to numbers greater than themselves are $2,3,6$. Thus $\operatorname{ret}(\sigma)=2$, $\operatorname{fix}(\sigma)=2$, and $\operatorname{exc}(\sigma) = 3$.