A topological invariant that counts connected components, holes, and voids in a shape to characterize its structure.