The number that remains unchanged during photosynthesis is the number of carbon atoms.
During photosynthesis, carbon dioxide is taken in, which contains carbon atoms, and glucose is produced, which also contains carbon atoms. The total number of carbon atoms is conserved throughout the process.