Added a connection attempt counter to the work I did yesterday with the new connect_to_ports().