Order of the centralizer of a permutation Given a permutation $\sigma\in S_{n}$, is there a way to know the order of the centraliser $C_{S_{n}}\left(\sigma\right)=\left\{ \pi\in S_{n},\,\pi\sigma=\sigma\pi\right\}$ , i.e what is $\left|C_{S_{n}}\left(\sigma\right)\right|$? 

I would appreciate a proof if the answer is yes.

Also, if the answer above is yes, is there also a way to calcualte the order of the centraliser of a given subset of $S_{n}$, or at least for a pair of permutations?
Let $n_1,n_2,\ldots,n_k$ be the distinct lengths of the cycles of $\sigma$ (including 1 if there are fixed points) and suppose that there are $m_i$ cycles of length $n_i$. Then the centralizer of $\sigma$ can permute the cycles of the same length. Its order is $\prod_{i=1}^k n_i^{m_i}m_i!$.

Calculating the centralizer of a subgroup $H$ of $S_n$ is not difficult, but it is more complicated. The order of the centralizer of a single orbit is equal to the number of fixed points (in that orbit) of the stabilizer of a point in the orbit. But if $H$ has more than one orbit with equivalent actions then the equivalent orbits can be permuted by the centralizer, so the complete centralizer is a direct product of wreath products of centralizers of sets of equivalent orbits.
Factor $\sigma$ into its orbits, and let $m_1, m_2, \ldots, m_i$ be the order of each of those orbits, with $m = \sum_{j=1}^i m_j$. For a permutation $\pi$ to commute with $\sigma$, for each of the orbits of $\pi$ we must have either that it is a power of an orbit of $\sigma$, or that it acts on none of the elements that $\sigma$ does. Thus we have that the centralizer group is isomorphic to

$$
\mathbb{Z}_{m_1}\oplus \mathbb{Z}_{m_2}\oplus \cdots \oplus\mathbb{Z}_{m_i} \oplus S_{n-m} 
$$