Let be a foliation of codimension 2 on a compact manifold with at least one non-compact leaf. We show that then must contain uncountably many non-compact leaves. We prove the same statement for oriented –dimensional foliations of arbitrary codimension if there exists a closed form which evaluates positively on every compact leaf. For foliations of codimension 1 on compact manifolds it is known that the union of all non-compact leaves is an open set [A Haefliger, Varietes feuilletes, Ann. Scuola Norm. Sup. Pisa 16 (1962) 367–397].
"Foliations with few non-compact leaves." Algebr. Geom. Topol. 2 (1) 257 - 284, 2002. https://doi.org/10.2140/agt.2002.2.257