The distribution of ionised hydrogen during the epoch of reionization (EoR) has a complex morphology. We propose to measure the three-dimensional topology of ionised regions using the Betti numbers. These quantify the topology using the number of components, tunnels and cavities in any given field. Based on the results for a set of reionization simulations we find that the Betti numbers of the ionisation field show a characteristic evolution during reionization, with peaks in the different Betti numbers characterizing different stages of the process. The shapes of their evolutionary curves can be fitted with simple analytical functions. We also observe that the evolution of the Betti numbers shows a clear connection with the percolation of the ionized and neutral regions and differs between different reionization scenarios. Through these properties, the Betti numbers provide a more useful description of the topology than the widely studied Euler characteristic or genus. The morphology of the ionisation field will be imprinted on the redshifted 21-cm signal from the EoR. We construct mock image cubes using the properties of the low-frequency element of the future Square Kilometre Array and show that we can extract the Betti numbers from such datasets if an observation time of 1000 h is used. Even for a much shorter observation time of 100 h, some topological information can be extracted for the middle and later stages of reionization. We also find that the topological information extracted from the mock 21-cm observations can put constraints on reionization models.