A ball is solid, a doughnut has one hole, a pretzel has more. You can't measure a hole with a ruler, but you can count them. Homology is the bookkeeping that tells shapes apart by how many holes of each kind they have.
Holes of different dimensions
Homology assigns to a space groups whose ranks — the Betti numbers — count holes by dimension: b₀ counts connected pieces, b₁ counts independent loops/tunnels, and b₂ counts enclosed voids.
Homeomorphic spaces share the same homology, so it can prove two spaces are different. A torus has b₁ = 2; a sphere has b₁ = 0 but b₂ = 1.
- Picture a loop drawn on a sphere — can it always shrink to a point?
- Now picture a loop around the hole of a torus.
- Count the independent loops you cannot shrink on each.
What you should see: On a sphere every loop shrinks (b₁ = 0). On a torus two independent loops cannot shrink (b₁ = 2), so they are topologically different.