# MUSIC algorithm for peak detection

On Wikipedia, is written that

MUltiple SIgnal Classification (MUSIC) is an algorithm used for frequency estimation.

One purpose of estimating the spectral density is to detect any periodicities in the data, by observing peaks at the frequencies corresponding to these periodicities.

I premise that I'm not an expert on the signal theory, therefore I do apologize if this question it will not be much precise.

Since MUSIC is an algorithm used for frequency estimation, and since purpose of estimating the spectral density is to detect any periodicities in the data, by observing peaks at the frequencies corresponding to these periodicities, my question is the following. Is MUSIC a method to detect the number of peaks in a power spectrum? Is it used for this purpose?

We could say MUSIC is optimal algorithm for spectrum estimation if the number of spectral peaks is a priory known and is less than estimator order, $M$. In MUSIC we need to estimate $R_{xx}$ autocovariance matrix of input random process first. The matrix dimension is limited to estimator's order, $M$. Second step is to perform SVD: $R_{xx} = U\cdot\Sigma\cdot V^{H}$ and $\Sigma$ is diagonal matrix with mimension also $M$. This matrix contains singular values of $R_{xx}$, the largest $K$ values correspond to signal's subspace while other - to noise one. For obvious reason $K < M$, so the limitation of the number of spectral peaks (in the other words - harmonic signal sources) becomes clear.
What you're searching is number of sources estimation or source enumeration. You can look through this article for example. In the case of MUSIC source enumeration problem can be viwed as signal's subspace estimation problem. You can find simple approach for the problem's solving in this article. It is called MDL, I checked it once while modeling the described SNR estimation algorithm in MATLAB. It seems to work well for pretty low SNR values. But remember you can't overcome limitation of $K < M$ for subspace based methods as I've described above.