There are 4 lone pairs of electrons present in the carbon dioxide molecule.
In order to be able to determine how many lone pairs are present in a carbon dioxide molecule, you need to draw its Lewis structure.
Carbon dioxide has a total of 16 valence electrons, 4 from carbon and 6 from each of the two oxygen atoms.
In order to give the central carbon atom a complete octet, you need to form two double bonds with the two oxygen atoms.
These bonds will account for 8 of the 16 valence electrons the molecule has.
The remaining 8 valence electrons will be placed as lone pairs, two on each oxygen atom.
As a result, you can say that the carbon dioxide molecule has a total of 4 lone pairs of electrons.
Now, there are other ways in which you can draw the Lewis structure for the