I finally got socket.io to work properly, but I have encountered a strange problem.
I am not sure if this is the best way, but I am using:
io.sockets.cli
with socket.io 2.2.0 it's easier :
io.on('connection', function (socket) { console.log( socket.client.conn.server.clientsCount + " users connected" ); });
cheers