Cohomological Theory of Dynamical Zeta Functions