Added solution for Counting Triangles