We prove that a type II1 factor M can have at most one Cartan subalgebra A satisfying a combination of rigidity and compact approximation properties. We use this result to show that within the class of factors M having such Cartan subalgebras A⊂M, the Betti numbers of the standard equivalence relation associated with A⊂M ([G2]), are in fact isomorphism invariants for the factors M, βHTn(M),n≥0. The class is closed under amplifications and tensor products, with the Betti numbers satisfying βHTn(Mt)=βHTn(M)/t, ∀t>0, and a Künneth type formula. An example of a factor in the class is given by the group von Neumann factor M=L(ℤ2⋊SL(2,ℤ)), for which βHT1(M)=β1(SL(2,ℤ))=1/12. Thus, Mt≄M,∀t≠1, showing that the fundamental group of M is trivial. This solves a long standing problem of R. V. Kadison. Also, our results bring some insight into a recent problem of A. Connes and answer a number of open questions on von Neumann algebras.