  We consider the flows generated by generic gradients of Morse maps of a
closed connected manifold $M$ to a circle. To each such flow we associate an
invariant counting the closed orbits of the flow. Each closed orbit is counted
with the weight derived from its index and homotopy class. The resulting
invariant is called the eta function, and lies in a suitable quotient of the
Novikov completion of the group ring of the fundamental group of $M$. Its
abelianization coincides with the logarithm of the twisted Lefschetz zeta
function of the flow. For $C^0$-generic gradients we obtain a formula
expressing the eta function in terms of the torsion of a special homotopy
equivalence between the Novikov complex of the gradient flow and the completed
simplicial chain complex of the universal cover of $M$.
