If barium (metal) has two valence electrons while chlorine (nonmetal) has seven, how many barium atoms are needed to form an ionic bond with chlorine?