I am looking over a proof for the Cauchy Frobenius formula, and I am having trouble exactly understanding how one step is done.

Let G be a finite group acting on non empty set S, $$I(g)=|\{s \in S : g \star s = s \}|$$

Then the number of distinct orbits is $$N=\frac{1}{|G|}\sum\_{g \in G} I(g)$$

So the parts I do follow;

First define $f(g,s)=1$ if $g \star s= s$ and $f(g,s)=0$ else

Then fixing $s$ gives, $$\sum\_{g \in G}f(g,s)=|stab(s)|$$

fixing $g$ gives ,

$$\sum\_{s \in S}f(g,s)=|I(g)|$$

So,
$$\sum\_{g \in G} I(g)=\sum\_{g \in G} \sum\_{s \in S}f(g,s)$$$$=\sum\_{s \in S} \frac{|G|}{|orb(s)|}$$

Now here is where it starts to get a bit fuzzy for me, we pick representives for each distinct orbit, $s\_{1},s\_{2},...s\_{N}$

and then we have continuation from above

$$=\sum\_{i=1}^{N} \sum\_{s \in orb(s\_{i})}\frac{|G|}{|Orb(s\_{i})|}$$

$$=\sum\_{i=1}^{N} \frac{|G|}{|orb(s\_{i})|}|orb(s\_{i})|$$

And it notes ( As all elements in the same orbit have same size of stabilizer)

This is the part where I am confused, how to we go from the double summation directly above, to the single summation below. What is going on? Can anyone help to explain this to me? Thanks