The answer's 6.
O2 (the 2 is usually written smaller and slightly below the line of the O) represent two oxygen atoms. And the C in front is a single atom of carbon.
This is because a number AFTER the atom refers only to the atom directly in front of it. A number before refers to EVERYTHING that goes after it.
So CO2 is 3 atoms (2 x O, 1 x C).
And putting a 2 in front of it multiplies that number by 2.
2 x (CO2)
2 x (3)
= 6 atoms.
Hope it helps!