Proving the number of non-fixed points in a self-inverse function is even I would like some guidance in how to solve this problem. I'm really trying to understand it, so hints and discussion would be preferred over a solution!

Le problem:   


  A function $f:S \to S$ is called self-inverting if $f(f(x))=x$ for every $x \in S$. A point $x \in S$ is called a fixed point of $f$ if $f(x)=x$.
  - Prove that, if $f:S \to S$ is a self-inverting function that has $k$ fixed points, then $|S|−k$ is even.


My reasoning so far:
When mapping $f:S \to S$, $f(x)=\frac{1}{x}$ the cardinality of $S$ is equal to $2n$, since every element in $S$ maps to a different element in $S$, except for the case of a fixed point, so that for every fixed point, the cardinality is $2n + k$? I am on the right track? If so, how should I approach proving this?
checkout fixed points theorem. 

|S| = |the number of fixed points| + |the number of non-fixed points|

what is |the number of fixed points|?

f(x) = x -> k=1 this means in your set S you have the 1 number that maps to itself. |k| where k=1 is 1.

What is |the number of non-fixed points|? 

f'(f(x)) = x .
1 non-fixed point map to 1 'other' point in S.  If there was a number n that described the number of points for x.  Then we would have n non-fixed points mapping to n 'other' points.  To count this number of points I would describe this as 2n points.  

This holds true for k=2 (and beyond). You have two numbers that map to themselves and the rest map to another number and back again.(2n)

The cardinality of your set has to be the 2n + k.  If you |S|= 2n + k and you subtract k, then you simply have 2n points.
checkout fixed points theorem. 

|S| = |the number of fixed points| + |the number of non-fixed points|

what is |the number of fixed points|?

f(x) = x -> k=1 this means in your set S you have the 1 number that maps to itself. |k| where k=1 is 1.

What is |the number of non-fixed points|? 

f'(f(x)) = x .
1 non-fixed point map to 1 'other' point in S.  If there was a number n that described the number of points for x.  Then we would have n non-fixed points mapping to n 'other' points.  To count this number of points I would describe this as 2n points.  

This holds true for k=2 (and beyond). You have two numbers that map to themselves and the rest map to another number and back again.(2n)

The cardinality of your set has to be the 2n + k.  If you |S|= 2n + k and you subtract k, then you simply have 2n points.