A cohomology for foliated manifolds