Add a way to know the total number of opened / closed sockets

Fix for #127