Calculates the number of right triangles that can be generated off of a set of 2D integer coordinates (threaded)