For a counter like that you would need to create a custom widget that stores the counter in the database and increase it by 1 on the server side as well whenever the user renders it or performs whatever the action is. You can make custom socket.io events or create a new API route.
Incrementing the value in the database is a simple db call like await db.incrObjectField('myCustomWidget', 'counter');