The task is to identify what atomic number actually measures.
Electron count changes when an atom forms a positive or negative ion, so it cannot be the fixed definition of atomic number.
Neutron count can differ between isotopes of the same element, for example carbon-12 and carbon-14, yet both have the same atomic number, so neutrons are not the definition.
Total protons plus neutrons is called the mass number, a different quantity from atomic number.
Only the proton count in the nucleus stays constant for a given element and uniquely identifies it on the periodic table, this is exactly what atomic number means.
So the atomic number equals the number of protons, option C.