You might enjoy https://andrewmbailey.com/dkl/Holes.pdfb on some related issues concerning holes, though IIRC it doesn't discuss anything equivalent to your question, which I think is as much mathematics as philosophy.
(I think I count holes, when in a rigorous sort of mood, by counting independent homotopy/homology classes of 1-dimensional loops in the complement of the object, so a straw has one hole, the surface of a ring doughnut has two, and e.g. a sock in good condition has none if you ignore the structure of the fabric it's made from. But meaning is contextual and I'm happy to talk about a "hole in the ground" which typically isn't a hole at all in this sense, and if someone said "did you know there's a big hole inside Mars", presumably meaning a cavity, I wouldn't object but would then be thinking of a different sort of topological hole.)
(I think I count holes, when in a rigorous sort of mood, by counting independent homotopy/homology classes of 1-dimensional loops in the complement of the object, so a straw has one hole, the surface of a ring doughnut has two, and e.g. a sock in good condition has none if you ignore the structure of the fabric it's made from. But meaning is contextual and I'm happy to talk about a "hole in the ground" which typically isn't a hole at all in this sense, and if someone said "did you know there's a big hole inside Mars", presumably meaning a cavity, I wouldn't object but would then be thinking of a different sort of topological hole.)