I'll discuss an approach to studying oscillations of functions based on ideas of topological data analysis. Applications include generalizations of two classical results, Courant's nodal domain theorem in spectral geometry and Bezout's theorem in algebraic geometry. Joint with Lev Buhovsky, Jordan Payette, Iosif Polterovich, Egor Shelukhin, and Vukašin Stojisavljevic.