Let $B \subset \mathbb{C}$ be an open set and assume that the boundary of $B$ consists of finitely many piecewise analytic curves. Suppose $z_0 \in \partial B$ and assume the following:
- $U(z_0 , r) = \{z : |z - z_0| < r \} \subset \overline{B}$
- $U(z_0 , r) \cap B$ is disconnected
- $z_0$ does not lie on any non-analytic part of $\partial B$
Then apparently it is always true that $U(z_0,r) \cap B$ has finitely many connected components.
This seems possible because of the imposed regularity on $\partial B$, but I do not know how to start with proving this.
$\textbf{Edit}$: Added hypothesis previously omitted (namely, $z_0$ does not lie on any non-analytic part of $\partial B$)
$\textbf{Edit 2}$: Moreover, given $\phi : B \rightarrow D$ (here $D = \phi(B)$ is a univalent function on $B$ (holomorphic and one-to-one), and $\partial D$ consists of finitely many piecewise analytic curves, and $\phi(z_0)$ does not lie on any non-analytic part of $\partial D$, why is it possible to extend $\phi$ analytically to a whole open neighbourhood of $z_0$?
$\textbf{Edit 3}$: A piecewise analytic curve is a (continuous) mapping $\gamma : [0,1] \rightarrow \mathbb{C}$, which on each (closed) subinterval $[t_{j-1},t_j]$ of some partition $t_0 = 0 < t_1 < ... < t_n = 1$, is the restriction of a holomorphic function defined on a neighbourhood of the subinterval, moreover we may suppose that this holomorphic function has non-vanishing derivative at each point of the subinterval. So by $z_0$ does not lie on any non analytic part of the boundary, I mean it is not the image of an endpoint of any such subinterval.
When you say "analytic", I guess you mean "real analytic" (or else $\partial B$ is discrete). I also guess that you want to prove that $U(z_0,r) \cap B$ has finitely many components up to lowering $r$ (or else, problems could happen far from $z_0$, where $\partial B$ is not analytic).
In this case, as $\partial B$ is analytic around $z_0$ of dimension $1$, then, up to reducing $r$, we can assume that $U(z_0,r) \cap \partial B = f^{-1}(\{0\})$ for some real analytic function $f : U(z_0,r) \rightarrow \mathbb{R}$. As $U(z_0,r) \subset \overline{B}$, $U(z_0,r) \cap B = U(z_0,r) \cap \left(\overline{B}\backslash\partial B\right)$ (because $B$ is open) $= U(z_0,r)\backslash(U(z_0,r) \cap \partial B) = f^{-1}(\mathbb{R}^*)$.
$f^{-1}(\{0\})$ is a closed analytic subset of $U(z_0,r)$, thus it has a finite number $N$ of irreducible components going through $z_0$. Therefore, up to reducing $r$, its complement $f^{-1}(\mathbb{R}^*)$ has less or equal than $2N < +\infty$ connected components.
Edit : This last sentence is not true, see the discussion in the comments below.
If $\partial B$ is analytic of dimension $0$ around $z_0$, this point is isolated so $U(z_0,r) \cap B$ has one connected component if $r$ is small enough.