How is atomic number related to the number of protons and electrons?
Atomic number is by definition the number of protons.
Not only does atomic number define the number of protons, because matter is electrically neutral, it also defines the number of electrons. (Because all matter is neutral, the number of electrons is equal to the number protons!).
Here is a video to help you determine the number of protons, neutrons and electrons found in atoms of different elements using this concept.
Video from: Noel Pauller
Hope this helps!