simple flow with a who | wc -l
and a switch ...
[{"id":"ef091c04beb228ca","type":"exec","z":"37731ca11bbd1b42","command":"who | wc -l","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":626,"y":360,"wires":[["974751273bbe2ff3"],[],[]]},{"id":"b5caf2dcc5d99384","type":"inject","z":"37731ca11bbd1b42","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":385,"y":360,"wires":[["ef091c04beb228ca"]]},{"id":"974751273bbe2ff3","type":"switch","z":"37731ca11bbd1b42","name":"","property":"$number($parseInteger($trim($$.payload), '#0'))","propertyType":"jsonata","rules":[{"t":"gt","v":"3","vt":"num"},{"t":"gt","v":"2","vt":"num"},{"t":"gt","v":"1","vt":"num"},{"t":"gt","v":"0","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"false","repair":false,"outputs":5,"x":804,"y":347,"wires":[["fab6c974689f21df"],["f9891084d34f65b0"],["107bf6521d8d7f6e"],["129a7599f3ef1a04"],["eec31dbe9a35fcde"]]},{"id":"fab6c974689f21df","type":"debug","z":"37731ca11bbd1b42","name":"> 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":996,"y":250,"wires":[]},{"id":"f9891084d34f65b0","type":"debug","z":"37731ca11bbd1b42","name":"> 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":996,"y":298,"wires":[]},{"id":"107bf6521d8d7f6e","type":"debug","z":"37731ca11bbd1b42","name":"> 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":996,"y":346,"wires":[]},{"id":"129a7599f3ef1a04","type":"debug","z":"37731ca11bbd1b42","name":"> 0","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":996,"y":394,"wires":[]},{"id":"eec31dbe9a35fcde","type":"debug","z":"37731ca11bbd1b42","name":"== 0","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":998,"y":439,"wires":[]}]