Sure, by back tracking.
If you can determine the amount of sugar and subsequently alcohol is in beer you can determine the amount of CO2. The formula of fermentation is C6H12O6 → 2 C2H5OH + 2 CO2. C6H12O6 is sugar, C2H5OH is ethanol, and CO2 is well CO2. So you know that for every two...