How many local maxima, or critical points, has a 'typical' random function on a high-dimensional sphere? We explain that this question is closely related, via the Kac-Rice formula, to the study of the spectrum of large random matrices. Our results give first qualitative description of the energy landscape of certain disordered physical systems, so called spin glasses.