The number of electron pairs shared by the two carbon atoms which are bonded by a triple bond are:

One bond is formed by sharing 2 electrons, and therefore a triple bond is formed by 6 electrons or 3 pairs of electrons.

7