added CountTriangles