See comments.
The boundary components $\{K_c\}_{c = 1}^C$ of the closure of a pre-compact open set $\Omega$ in a topological manifold $M$ are separated by disjoint connected open sets in $M$, and for each $c = 1, \ldots, C$ a sequence $\{U_{c, k}\}_{k = 1}^\infty$ of such open sets can be chosen with limits $\bigcap_{k = 1}^\infty U_{c, k}$ equal to each given boundary component. The union $\bigcup_{c = 1}^C U_{c,k}$ of the sets at each index covers $\partial \Omega$, and the complements of these unions in $\Omega$ forms a particular sequence of compact sets $\{\Omega \backslash \bigcup_{c = 1}^C U_{c,k}\}_{k = 1}^\infty$ exhausting $\Omega$. Each $\Omega \backslash \bigcup_{c = 1}^C U_{c,k}$ is compact because $\bigcup_{c = 1}^C U_{c,k}$ is an open set covering $\partial \Omega$, so $\Omega \backslash \bigcup_{c = 1}^C U_{c,k} = \overline{\Omega} \backslash \bigcup_{c = 1}^C U_{c,k}$ is a closed subset of the compact set $\overline{\Omega}$
It follows that the rank plus one of the limit defined in Moishe Kohan's answer is greater than or equal to the number of connected components of $\partial \Omega$. Moishe Kohan shows this rank is $0$ for the set $\Omega$ in question.