socket.io Can't get number of clients in room

I am making a game and I want to create 2-user rooms, when I try to get the number of users

io.sockets.emit('roomUsers', io.sockets.clients(openRoom).lenght);

node.js crashes

This is the log I get, I have no clue what does it mean:

/Users/ilya/game-app-1/node_modules/socket.io/lib/parser.js:75
      data = JSON.stringify(ev);
                  ^
TypeError: Converting circular structure to JSON
    at Object.stringify (native)
    at Object.exports.encodePacket (/Users/ilya/game-app-1/node_modules/socket.io/lib/parser.js:75:19)
    at SocketNamespace.packet (/Users/ilya/game-app-1/node_modules/socket.io/lib/namespace.js:154:23)
    at SocketNamespace.emit (/Users/ilya/game-app-1/node_modules/socket.io/lib/namespace.js:188:15)
    at Socket.<anonymous> (/Users/ilya/game-app-1/app.js:101:14)
    at Socket.EventEmitter.emit [as $emit] (events.js:96:17)
    at SocketNamespace.handlePacket (/Users/ilya/game-app-1/node_modules/socket.io/lib/namespace.js:335:22)
    at Manager.onClientMessage (/Users/ilya/game-app-1/node_modules/socket.io/lib/manager.js:488:38)
    at WebSocket.Transport.onMessage (/Users/ilya/game-app-1/node_modules/socket.io/lib/transport.js:387:20)
    at Parser.<anonymous> (/Users/ilya/game-app-1/node_modules/socket.io/lib/transports/websocket/hybi-16.js:39:10)

It means it's trying to convert an object to json and there is a member down the tree pointing to one of it's parent. This would create an infinitely deep json file due to recursion

JSON.stringify() cannot convert objects that have circular references. Whatever 'ev' is, it references itself in some way inside of itself.

DOM nodes, for example, have ownerDocuments, which refers to document. document ends up referencing itself through document.body.ownerDocument.