How can the number of molecules and atoms be the same in a gas?
The gas was one (or a mixture) of the noble gases, as every other gas is composed of more atoms than molecules.

Example


Helium: $1~\text{mol}~\ce{He}~\text{gas} = 1~\text{mol}~\ce{He}~\text{atoms}$
Nitrogen: $1~\text{mol}~\ce{N2}~\text{gas} = 2~\text{mol}~\ce{N}~\text{atoms}$