  Complex systems, and in particular random neural networks, are often
described by randomly interacting dynamical systems with no specific symmetry.
In that context, characterizing the number of relevant directions necessitates
fine estimates on the Ginibre ensemble. In this Letter, we compute analytically
the probability distribution of the number of eigenvalues $N_R$ with modulus
greater than $R$ (the index) of a large $N\times N$ random matrix in the real
or complex Ginibre ensemble. We show that the fraction $N_R/N=p$ has a
distribution scaling as $\exp(-\beta N^2 \psi_R(p))$ with $\beta=1$
(respectively $\beta=1/2$) for the complex (resp. real) Ginibre ensemble. For
any $p\in[0,1]$, the equilibrium spectral densities as well as the rate
function $\psi_R(p)$ are explicitly derived. This function displays a third
order phase transition at the critical (minimum) value $p^*_R=1-R^2$,
associated to a phase transition of the Coulomb gas. We deduce that, in the
central regime, the fluctuations of the index $N_R$ around its typical value
$p^*_R N$ scale as $N^{1/3}$.
