For ease you find by the following method.
If you see a single bond between any two elements the count it as a sigma bond .
Now if you see a double bond between any two elements count one of them as sigma and the other as a pi bond.
.This shows that if two elements are bonded by double or triple bond then one of them is sigma and the remaining are counted as pi bonds.PLZ aPPROVE