The number of right triangles is
C(n,2)*C(4,3)= n *(n- 1)/2 * 4 = 2n *(n- 1)
Or, in another way:
C(n, 1)*C(2n-2, 1)= n *(2n-2)= 2n *(n- 1)