What is a quick way to find out the number of valence electrons of a given element?
If it is a Group I metal, there is one valence electron; a Group II metal, 2 valence electrons. The transition metals also, generally, have the same number of valence electrons as their Group number, but, here, different considerations apply.
Beyond the Transition metals, Group 14, Group 15, Group....17, there are 4, 5, and......7 valence electrons respectively, All of this is pretty easy to rationalize and understand given a Periodic Table. You will definitely be allowed access to a Periodic Table in every chemistry and physics exam you ever sit.