The number of valence electrons in an element is the number of electrons in the outer shell. This is also the number of electrons that participate in bond formation with similar or different atoms.
For Vanadium, the atomic number is 23 and the electronic configuration given is
`1s^2, 2s^2, 2p^6, 3s^2, 3p^6, 3d^3, 4s^2`
Thus vanadium has 5 valence electrons and during ionic bonding, s-shell electrons are lost first and than d-shell electrons would be lost.
For Copper, the atomic number is 29 and the electronic configuration is given as
`1s^2, 2s^2, 2p^6, 3s^2, 3p^6, 3d^10, 4s^1`
Copper also happens to be a transition element and is known to have two valence states: cuperous (1 valence electron) and cupric (2 valence electrons). In the former, copper will lose the 4 s electron, while in the latter it will lose 1 electron from 3 d shell as well.
Hope this helps.