Definition (Lefschetz number, Euler characteristic of simplicial complex)
Let $X$ be a triangulable space.
The Lefschetz number of a continuous map $f: X\to X$ is $$ \begin{align*} L(f) := \sum_{n\geq 0} (-1)^n \, \tr(f_\ast: H_n(X; \Q)\to H_n(X; \Q)). \end{align*} $$ where $f_\ast$ is the induced map on the rational homology, and $\tr$ is the trace of the $\Q$-linear endomorphism.
The Euler characteristic of $X$ is $$ \begin{align*} χ(X) := L(\id_X) = \sum_{n\geq 0} (-1)^n \, \dim_\Q H_n(X; \Q). \end{align*} $$
Letting $K$ be a triangulation of $X$ and $f_\bullet: C_\bullet(K; \Q) \to C_\bullet(K; \Q)$ be the induced chain map, we also have $$ \begin{align*} L(f) = \sum_{n\geq 0} (-1)^n \, \tr(f_n: C_n(K; \Q) \to C_n(K; \Q)). \end{align*} $$ (Proof) > Therefore $χ(K) = \sum_{n\geq 0} (-1)^n \, \#\set{n\text{-simplices of }K}$.