count triangle