Looking at the periodic table, oxygen is in group 6A, meaning it has 6 valence electrons. Another way to determine this is look for the noble gas in the same row as the element whom's valence electrons you wish to find and subtract 1 valence electron from 8 until you reach the desired element. This will be your amount of valence electrons :)