irreducible components of subscheme Let $f : X \to Y$ be a closed immersion of (noetherian) schemes. 
Is there any "general" result on $f$ out there ensuring that $X$ has the same number of irreducible components as $Y$ ?
 A: In my humble opinion: this is a question with courious answers!, I propose two conditions: a sufficient condition and a (quasi) necessary condition.
Quasi necessary condition: for all $x\in X,\,f^{\sharp}_x:\mathcal{O}_{Y,f(x)}\to\mathcal{O}_{X,x}$ is an isomorphism; in this way the irreducible components of $X$ in which $x$ is contained are in bijection with the irreducible components of $Y$ in which $f(x)$ is contained (for a proof, you can see here), and in this way one uses the hypothesis of Noetherianess of $Y$ (and $X$).
But this condition is equivalent to say that $f$ is an open immersion; see E.G.A., chapitre I, proposition 4.2.2.(a).
For exact, a necessary condition is that for all $x\in X,\,f^{\sharp}_x$ induces a bijection between the sets of minimal prime ideals of $\mathcal{O}_{X,x}$ and $\mathcal{O}_{Y,f(x)}$. 
Sufficient condition: $f$ induces a homeomorphism between the underlying topological spaces $|X|$ and $|Y|$ of $X$ and $Y$.
Warning: if $f$ satisfies the second condition then $f$ does not need to be an isomorphism of schemes; indeed, for example: for any non-reduced scheme $Z$, one can consider the associated reduced scheme $Z_{red}$; there exists a canonical closed immersion (of schemes) $i:Z_{red}\to Z$, $i$ is not an isomorphism of schemes even though $|Z|=|Z_{red}|$, and $i$ does not need to be an open immersion (of schemes).
