Using the replica method, we develop an analytical approach to compute the characteristic function for the probability P N (K,λ) that a large N × N adjacency matrix of sparse random graphs has K eigenvalues below a threshold λ. The method allows to determine, in principle, all moments of P N (K,λ), from which the typical sample-to-sample fluctuations can be fully characterized. For random graph models with localized eigenvectors, we show that the index variance scales linearly with N 1 for |λ| > 0, with a model-dependent prefactor that can be exactly calculated. Explicit results are discussed for Erdös-Rényi and regular random graphs, both exhibiting a prefactor with a nonmonotonic behavior as a function of λ. These results contrast with rotationally invariant random matrices, where the index variance scales only as ln N , with an universal prefactor that is independent of λ. Numerical diagonalization results confirm the exactness of our approach and, in addition, strongly support the Gaussian nature of the index fluctuations.