1. Calculate the energy of one photon:
The energy \(E\) of a photon is given by:
\[
E = \frac{hc}{\lambda}
\]
where:
\begin{itemize}
\item \(h = 6.6 \times 10^{-34} \, Js}\) (Planck's constant),
\item \(c = 3 \times 10^8 \, m/s}\) (speed of light),
\item \(\lambda = 500 \, nm} = 500 \times 10^{-9} \, m}\) (wavelength).
\end{itemize}
Substituting the values:
\[
E = \frac{6.6 \times 10^{-34} \times 3 \times 10^8}{500 \times 10^{-9}}
\]
\[
E = \frac{19.8 \times 10^{-26}}{500 \times 10^{-9}}
\]
\[
E = \frac{19.8 \times 10^{-26}}{5 \times 10^{-7}}
\]
\[
E = 3.96 \times 10^{-19} \, J}
\]
2. Calculate the total energy entering the pupil per second:
The intensity \(I\) is given as \(0.1 \, nWm}^{-2} = 0.1 \times 10^{-9} \, Wm}^{-2}\).
The area \(A\) of the pupil is \(0.4 \, cm}^2 = 0.4 \times 10^{-4} \, m}^2\).
The power \(P\) entering the pupil is:
\[
P = I \times A
\]
\[
P = 0.1 \times 10^{-9} \times 0.4 \times 10^{-4}
\]
\[
P = 4 \times 10^{-15} \, W}
\]
Since \(1 \, W} = 1 \, J/s}\), the energy per second is:
\[
E_{total}} = 4 \times 10^{-15} \, J/s}
\]
3. Calculate the number of photons per second:
The number of photons \(N\) per second is given by:
\[
N = \frac{E_{total}}}{E}
\]
\[
N = \frac{4 \times 10^{-15}}{3.96 \times 10^{-19}}
\]
\[
N \approx 1.01 \times 10^4
\]
Final Answer:
\[
\boxed{1.01 \times 10^4}
\]