For an $n$-dimensional object, how many types of holes are possible?
Solution 1:
I think Alexander Duality is what you are looking for. I gather that you are a non-expert, so I will attempt to describe in fairly informal terms how Alexander duality deals with the questions that you are interested in. Consequently, I'll suppress the inevitable technicalities, since they don't enter into the very geometric situations that you are interested in.
Alexander duality deals with the following situation. Let $S^n$ denote the $n$-dimensional sphere. Note that you can think of the $n$-sphere as being standard $n$-dimensional space $\mathbb{R}^n$ with an extra point "at infinity" added in (take a look at stereographic projection if this is unfamiliar to you). The upshot of this is that working with the $n$-sphere is not too far away from the situation you are interested in. Now take some subspace $X$, like the $m$-balls you are removing. Or take anything else; a solid torus of whatever genus you like, higher-dimensional manifolds, etc. Let $Y$ denote the complement of $X$ inside $S^n$. Then, in very informal terms, Alexander duality asserts that homologically, $Y$ is exactly as complicated as $X$. Somewhat more technically, Alexander duality asserts that for all $q$, there is an isomorphism $$ \tilde H _q(Y) \cong \tilde H^{n-q-1}(X) $$ between the reduced homology of $Y$ and the reduced cohomology of $X$ (for whatever coefficient group we choose). If the meaning of this is somewhat unfamiliar to you, you might be more interested to know that this says that the Betti numbers of $Y$ can be computed from those of $X$. In the range $1 \le q \le n-2$, a consequence of Alexander duality is that $$ B_q(Y) = B_{n-q-1}(X), $$ where $B_k(Z)$ indicates the $k^{th}$ Betti number of a space $Z$. If the piece $X$ that you are removing has $p$ components, this also implies that $B_{n-1}(Y) = p-1$.
As I remarked before, Alexander duality says that the topology of a space obtained by cutting a piece out is, from the point of view of homology (which encapsulates Betti numbers) exactly as complicated as the piece being removed. It is interesting to note that from the point of view of homotopy theory, this is incredibly far from being true. A basic technique in knot theory is to study a knot by studying the topology of its complement in $\mathbb R^3$ (or $S^3$). Homologically, Alexander duality says this is very boring, but from the perspective of homotopy theory, the story is very interesting indeed.