  Let $M$ be a compact manifold. and $D$ a Dirac type differential operator on
$M$. Let $A$ be a $C^*$-algebra. Given a bundle $W$ of $A$-modules over $M$
(with connection), the operator $D$ can be twisted with this bundle. One can
then use a trace on $A$ to define numerical indices of this twisted operator.
We prove an explicit formula for this index. Our result does complement the
Mishchenko-Fomenko index theorem valid in the same situation.
  We establish generalizations of these explicit index formulas if the trace is
only defined on a dense and holomorphically closed subalgebra $\mathcal{B}$.
  As a corollary, we prove a generalized Atiyah $L^2$-index theorem if the
twisting bundle is flat.
  There are actually many different ways to define these numerical indices.
  From their construction, it is not clear at all that they coincide. An
important part of the paper are complete proofs of this statement. In
particular, we establish the (well known but not well documented) equality of
Atiyah's definition of the $L^2$-index with a K-theoretic definition.
  In case $A$ is a von Neumann algebra of type 2, we put special emphasis on
the calculation and interpretation of the center valued index. This completely
contains all the K-theoretic information about the index of the twisted
operator.
  Some of our calculations are done in the framework of bivariant KK-theory.
