Cylindrical algebraic decomposition is a method that represents a real algebraic or semi-algebraic set as a cell complex. In general, this cell complex does not have good topological properties and therefore cannot necessarily be used for calculating topological invariants. I will describe joint work with James Davenport and Acyr Locatelli in which we use tools from topology and real algebraic geometry to overcome this problem.