n_crossing_points function

Number of crossing points