SIngle bonds are comprised of 1 sigma bond, double bonds are comprised of 1 sigma and 1 pi bond, and triple bonds are comprised of 1 sigma and 2 pi bonds.
So, here's how the TNT molecule looks like
Every red ball is an oxygen atom, every black ball is a carbon atom, every dark blue ball is a nitrogen atom, and every light blue ball is a hydrogen atom.
Let's count the double bonds first, since there are fewer of those present. Notice that you have 6 double bonds - 1 between each nitrogen atom and an oxygen, and 3 in the six-carbon ring.
So, 6 double bonds are comprised of a total of 6 sigma and 6 pi bonds. Now for the single bonds. If you carefully count all the single bonds visible, you'll come up with 15. All 15 single bonds are also sigma bonds, which brings the total of sigma bonds present to 21.
If you're more comfortable with a structure that looks like this
be sure to count the bonds between the carbon and hydrogen, since neither of those are visible here.