Abundance of Excited Ions in O+ and O2+ Ion Beams