count_unconnected_node_pairs function

Get the number of unconnected node pairs