A quantitative approach to the topology of large-scale structure