COUNTING number of pairs of intersecting chords
===

Consider N chords in a circle each determined by its endpoints.Describe an O(nlogn) solution for determining the number of pairs of chords that intersect inside the circle.          
ASSUMPTION: no two chords share an endpoint.