The energy is not stored in a count of carbon atoms. By this thinking six carbon dioxide molecules should have the same potential energy as a glucose molecule.
The energy required to make atoms bond to other atoms to make molecules is where the energy is stored - bonds between atoms = potential energy. In glucose the carbon atoms are in a reduced state, when the bonds are broken (oxidized) the energy is released. The carbon is oxidized. The total stored energy goes down.
When a molecule is split apart (1 glucose -> 2 pyruvate) some of the potential energy is lost. Because one of the bonds is broken by oxidation.
This is kind of too simplified, but is the basic idea you seem to have have missed.