How Count subscribes on Chanel Web Socket

I’d like to do an online user counter on my site, but I didn’t find it in the channel subscriber count documentation.

something like

this.socket.subscribedGet('users')

Can someone help me?

What about storing this in a global variable or database table?