Use the standard notation for atoms to see this clearly.
An atom is written as $^{A}_{Z}X$, where $Z$ is the atomic number, protons, and $A$ is the mass number.
By definition, $A = Z + N$, where $N$ is the number of neutrons.
Protons and neutrons are collectively called nucleons because they reside in the nucleus, so $A$ is simply the total nucleon count.
Checking the other options: protons alone give $Z$, not $A$; protons plus electrons only reflects charge neutrality; neutrons alone give only $N$, not the full mass number.
So the mass number equals the number of nucleons, option C.