  The gas mass of protoplanetary disks, and the gas-to-dust ratio, are two key
elements driving the evolution of these disks and the formation of planetary
system. We explore here to what extent CO (or its isotopologues) can be used as
a tracer of gas mass. We use a detailed gas-grain chemical model and study the
evolution of the disk composition, starting from a dense pre-stellar core
composition. We explore a range of disk temperature profiles, cosmic rays
ionization rates, and disk ages for a disk model representative of T Tauri
stars. At the high densities that prevail in disks, we find that, due to fast
reactions on grain surfaces, CO can be converted to less volatile forms
(principally s-CO$_2$, and to a lesser extent s-CH$_4$) instead of being
evaporated over a wide range of temperature. The canonical gas-phase abundance
of 10$^{-4}$ is only reached above about 30-35 K. The dominant Carbon bearing
entity depends on the temperature structure and age of the disk. The chemical
evolution of CO is also sensitive to the cosmic rays ionization rate. Larger
gas phase CO abundances are found in younger disks. Initial conditions, such as
parent cloud age and density, have a limited impact. This study reveals that CO
gas-phase abundance is heavily dependent on grain surface processes, which
remain very incompletely understood so far. The strong dependence on dust
temperature profile makes CO a poor tracer of the gas-phase content of disks.
