In the photosynthesis reaction, the typical equation is represented as:
\[ 6CO_2 + 6H_2O \rightarrow C_6H_{12}O_6 + 6O_2 \]
This indicates that 6 molecules of carbon dioxide (each containing 1 carbon atom) are used, resulting in 1 molecule of glucose (which contains 6 carbon atoms).
Thus, if we focus specifically on the number of carbon atoms combining in the reaction, the answer is:
6