Count Right Triangles in Grid

From HackerRank. Count right triangles on grid. Solve the geometry problem "Count Right Triangles in Grid".

Examples
Input: [1,2,3]
Output: 0
Hints

Count Right Triangles in Grid

**From HackerRank.** Count right triangles on grid. Solve the geometry problem "Count Right Triangles in Grid".