This paper defines an invariant for certain vector fields called Yamabe-type flows, which have a conformal invariance built in, and uses it in order to give partial answers to scalar curvature problems in dimension

$n\ge 7$. The scalar curvature of a metric conformal to the standard one on

${S}^{n}$ is assumed to have nondegenerate critical points of the variational problem. A Morse variational lemma at infinity is derived, which allows to see how the unstable manifold is built. The paper computes the intersection number of the critical points at infinity. The Yamabe flow becomes a pseudogradient for the variational problem, which satisfies the Palais-Smale condition on its decreasing flow lines.