I feel blocked with this claim - it sounds intuitively true, just thinking as a jellyfish entering a real line, the intersection of her legs with the real line is certainly finite since the jellyfish is compact - but I stuck with why.
$X$ and $Z$ are closed submanifolds inside $Y$ with complementary dimension. If at lease one of them, say $X$, is compact, and $X \pitchfork Z$, then $X \cap Z$ must be a finite set of points.
I understand that $X \cap Z$ is a zero-dimensional manifold. So it must be a series of disjoint points.
Then I start to guess: this conclusion is perhaps related to each sequence in a compact set has finite subsequence? So let $X \cap Z$ be the sequence, and hence it needs to be finite?
The statement is from Guillemin and Pollack's Differential Topology.