Number of atoms present in a system is equal to number of atoms in each molecule multiply by number of such molecules.
In present case, each nitrogen molecule has 2 nitrogen atoms. Thus, three N2 molecules has 3 X 2 = 6 atoms.
Additional information: If system has 1 mole of N2 molecules, it will have 6.023 X 10^23 molecules of N2. Thus, there are 2 X 6.023 X 10^23 atoms in 1 mole of N2.