Term symbols: counting electrons. How? I am having some difficulty in writing the correct term symbols for diatomic molecules in their ground states.

For instance, the $\ce{S2}$ molecule has a MO configuration in its valence shell $\ce{3s\sigma^2_u 3s\sigma^2\mbox{*}_g 3p_z\pi^2_u 3p_y\pi^2_u 3p_x\pi^2_u 3p_y\pi^1\mbox{*}_g 3p_x\pi^1\mbox{*}_g}$

Now, for its term symbol I would say (erroneously) that I have two unpaired pi electrons, hence $\ce{\Lambda}=2$, so I would obtain a $\ce{\Delta}$ symbol.

As for the spin multiplicity, it would be 3. And the spin-orbit coupling term would be therefore S+2=3. Concerning simmetry, I would say that it's g, since the last occupied shell is g (still, I don't understand why Ar2 should be g if the last shell is u. Maybe because having wto electrons in a u shell I should consider u*u=g? If that is the case, it's correct to say that every molecule with an even number of electrons in the last energy level, and hence every homonuclear diatomic, is g?)

Actually, it looks like the correct term symbol for the $\ce{S2}$ molecule is $\ce{^3\Sigma _g}$, but I don't understand why. Can you help me please?
This example is probably described quite thoroughly on the internet for the case of $\ce{O2}$ (which is isoelectronic), so it may be worth searching a bit for alternate explanations.

You cannot have a $^3\Delta$ term symbol, because of the Pauli exclusion principle. The π* orbitals come as a set of two: essentially, one of those two is associated with +1 angular momentum, and the other is associated with −1 angular momentum.

Here, to be specific, "angular momentum" refers to the projection of the angular momentum onto the internuclear axis. The "angular momentum" quantum number of each MO is denoted $\lambda$, so in other words, the π* orbitals come as a set of $\lambda = +1$ and $\lambda = -1$.

The quantum number that measures the "angular momentum" of the term is denoted $\Lambda$, and because $\Lambda$ is a projection quantum number, the value of $\Lambda$ is simply the sum of the individual $\lambda$ values. The Greek letter that represents it in the term symbol depends on the absolute value of $\Lambda$: if $\Lambda = 0$ then it is a $\Sigma$ term, if $|\Lambda| = 1$ then it is a $\Pi$ term, and if $|\Lambda| = 2$ it is a $\Delta$ term.

Now, in the ground state configuration of $\ce{S2}$, we can ignore all the orbitals below the π* orbitals because all those $\lambda$'s sum to zero. The only thing of interest is the π* electrons.

If you want to have a triplet state, i.e. the electrons have the same spin, then you cannot put them into the same π* orbital: one will have to go into the $\lambda = +1$ orbital, and the other will have to go into the $\lambda = -1$ orbital. Hence you get $\Lambda = 0$, which leads to a $^3\Sigma$ term symbol, not a $^3\Delta$.

Finding the parity of the term symbol is nothing more than multiplying all the individual parities of the electrons (i.e. for doubly occupied $\mathrm{g}$ MOs you need to multiply by $\mathrm{g}$ twice). This is useful, because $\mathrm{g \otimes g = u \otimes u = g}$, which allows you to immediately discard all doubly occupied MOs. You only need to look at the two π* electrons, which are both $\mathrm{u}$, leading to an overall $\mathrm{g}$ parity and a $^3\Sigma_\mathrm{g}$ term symbol.

For $\Sigma$ term symbols there is an additional detail in that you need to specify the symmetry with respect to reflection in a plane containing the molecule. In this case it turns out that the molecular wavefunction is antisymmetric with respect to this reflection, so the proper term symbol is $^3\Sigma_\mathrm{g}^-$.