In the context of the p-spin spherical model, we introduce a method fo
r the computation of the number of stationary points of any nature (mi
nima, saddles, etc.) of the Thouless-Anderson-Palmer free energy. In d
oing this we clarify the ambiguities related to the approximations usu
ally adopted in the standard calculations of the number of states in m
ean-field spin-glass models.