The first step of glucose metabolism is glyclosis wherein glucose is converted to 2 molecules of pyruvate. This process will produce a total of 2 ATP. 2 NADH (important in the oxidative phosphorylation) is also produced in this process. The 2 pyruvate molecules will then be converted to acetyl-CoA and in this process, 2 NADH is produced. Now, we have a total of 2 ATP and 4 NADH.
The second step is the tricarboxylic acid cycle (Kreb's cycle, citric acid cycle). An acetyl-CoA molecule will yield 1 GTP (equivalent to ATP, will use ATP for simplicity), 3 NADH, and 1 FADH2 (this is also important in the oxidative phosphorylation). Since we have 2 acetyl coA molecules, then the yield of this process is doubled at 2 ATP, 6 NADH, and 2 FADH2. Now we have a total of 4 ATP, 10 NADH, and 2 FADH2.
The last step is the oxidative phosphorylation wherein our reducing compounds (NADH and FADH2) is oxidized to NAD and FAD leading to the production of ATP. As a rule, 1 molecule of NADH yields 3 ATP molecules and 1 molecule of FADH2 yields 2 ATP molecules. Since we have 10 NADH molecules, we'll get 30 ATP from that. We also have 2 FADH2 molecules and we'll get 4 ATP from that.
Now we have a total of 34 ATP from oxidative phosphorylation and 4 ATP from glycolysis, conversion of pyruvate to acetyl-CoA, and TCA cycle; ultimately yielding 38 ATP molecules from 1 molecule of glucose.
The glycolysis of one glucose molecule produces two acetyl CoA molecules, the reactions in the glycolytic pathway and citric acid cycle produce six CO2 molecules, ten (10) NADH molecules, and two (2) FADH2 molecules per glucose molecule. Therefore the total number of NADH + FADH2 molecules produced is 12.