How many valence electrons must a calcium atom lose to get 8 valence electrons?

It must lose two electrons (the outside two "valence" electrons), then the next inner shell will have eight.