add method to check number of pieces in a triangle