Is there a method for finding the number of eigenvectors with a given eigenvalue? I do not need the eigenvectors themselves, and to find the eigenvectors seems quite tough, given the comments on the answer to the question Compute eigenvectors of a matrix with known eigenvalue spectrum.
I have many randomly-generated adjacency matrices $M$ with dimensions roughly $10^5$ x $10^5$ with elements $0$ or $1$. I can show analytically that these matrices are very likely to have many (roughly $10^3$) eigenvalues that are exactly $1$. The other eigenvalues are within a roughly symmetric eigenspectrum about $0$ and have a rough spacing of around $10^{-4}$ between adjacent eigenvalues, including near $1$. I am interested in the number of degenerate eigenvalues at $1$.
I'm tempted to try shift-invert with Scipy's sparse package which uses ARPACK and LAPACK, though I've often found that shift-invert struggles with interior eigenvalues when the level spacing is small.
However, I am wondering if there's a way to avoid interior eigensolving altogether and to estimate instead the number of degenerate eigenvalues through more clever means.
As an aside, for my particular problem, I am happy with approximate algorithms so long as the error in the degeneracy is bounded by $5$% of the true degeneracy, or, maybe more practically, if a $95$% confidence interval has a width of $10%$.