TITLE: Possible number of components of anticanonical sections of projective manifolds
QUESTION [7 upvotes]: Let $M$ be a connected projective complex manifold with a smooth anticanonical divisor $D$ ($D \sim -K_M$).
Let $k$ be the number of components of $D$.
Some cheap thoughts give:
If $M$ is a Fano manifold of dimension higher than one, $k=1$.
If $M=\mathbb P^1$ or $M= \mathbb P^1 \times X$, where $X$ is a projective manifold with trivial canonical class, then $k=2$.
Is it possible to have $k$ bigger than two?  Is $k$ bounded?

REPLY [4 votes]: (Let me turn my comment into an answer to give a correct attribution.)
Yes, in the setup you describe, the maximum number of connected components of the divisor $D$ is 2. This is related to the so-called connectedness principle in birational geometry.
The statement that you want follows from Proposition 5.1 of Log canonical singularities are Du Bois by Kollár and Kovács. They prove in particular that if $(Y,\Delta)$ is an lc pair such that $K_Y + \Delta$ is $\mathbf Q$-linearly equivalent to 0, then the non-klt locus $\operatorname{nklt}(Y,\Delta)$ has 1 or 2 components.
In your case, taking $\Delta=D$, then $\operatorname{nklt}(Y,\Delta)$ is just (the support of) $D$, so this set has at most 2 connected components.