TITLE: Topological invariants by integrals
QUESTION [8 upvotes]: Some topological invariants that can be found e.g. in knot theory can be represented as integrals (Example: Integral for computing the Gauss linking number). Another example is the complex plane with poles: If the poles are defined by Terms like $\frac{1}{z-z_i}$ with some natural number $i$ that is indexing the pole then the number of poles (topological invariant) can be expressed as: 
$N = \int_C \frac{f(z)dz}{2 \pi i}$.
In differential geometry the total curvature of a curve $c(t)$ parametrized by $t \in [0,1]$ is obtained by
$TC[c(t)]= \int_0^1 \kappa(t) dt$
with the curvature of the curve $\kappa(t)$. Also the Gauss-Bonnet Theorem computes the Euler characteristic from an integral.
Question: Can be expressed other topological invariants in Terms of integrals over (differential-)geometrical functions like curvature, Gauss curvature, etc.?
What Basic ideas are used to link topological invariants with such integrals (how one can derive such identities)?

REPLY [3 votes]: I was hoping someone would give a more complete answer, but let me just indicate that the answer is yes, absolutely, a vast range of invariants can be so computed. This line of thought leads through Grothendieck-Riemann-Roch and the work of Hirzebruch to the Atiyah-Singer index theorem, which has been one of the impetus for the resurgence of interaction between mathematics and physics over the past thirty years.