We develop a new estimator of the number of factors in the approximate factor models. The estimator works well even when the idiosyncratic terms are substantially correlated. It is based on the fact, established in the paper, that any finite number of the largest “idiosyncratic” eigenvalues of the sample covariance matrix cluster around a single point. In contrast, all the “systematic” eigenvalues, the number of which equals the number of factors, diverge to infinity. The estimator consistently separates the diverging eigenvalues from the cluster and counts the number of the separated eigenvalues. We consider a macroeconomic and a financial application.