In carbon dioxide (CO2), there are two oxygen atoms for each carbon atom. Each oxygen atom forms a double bond with carbon, so the molecule is formed by two double bonds.
Two double bonds means that the total number of electrons being shared in the molecule is