Firstly, whenever we talk about gives free energy, we talk about closed systems or reactions occurring under closed systems. So what is a closed system? A closed system simply means that no mass is exchanged, only energy is exchanged. And since mass is matter, and matter are molecules, that means no molecules go into the system and no molecules lead the system. So the number of moles remains constant. Secondly, reactions are under constant temperature and pressure.