Note that the fixed points of $f$ can be characterized as the intersection points of the graph of $f$, which is a submanifold of $M\times M$, with the diagonal of $M\times M$
$$\Delta_M=\big\{ (x,y)\in M\times M:\;];x=y\big\}. $$
The Lefchetz number of $f$ at a fixed point $x_0$ is then the local intersection number of the Graph $\Gamma_f$ with the diagonal $\Delta_m $ at $(x_0,x_0)\in M$. See Sec 7.3. of these notes.