Count the number of possible triangles

From GeeksforGeeks. Counting triangles from side lengths. Solve the geometry problem "Count the number of possible triangles".

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

Count the number of possible triangles

**From GeeksforGeeks.** Counting triangles from side lengths. Solve the geometry problem "Count the number of possible triangles".