In RHEL 10, both 'uptime' and 'w' commands do not report the correct number of users. For example, on a freshly booted RHEL 10 systems with no sessions opened, opening a session and running 'uptime' will show '2 users' logged in, when it's only one.
It seems this occurs due to unconditionally reading /run/systemd/sessions and considering each entry there as a logged in user.
Example reproducer:
root@vm-rhel10:~# for i in $(seq 1 10); do touch /run/systemd/sessions/foo$i; done root@vm-rhel10:~# uptime 16:37:22 up 20 min, 12 users, load average: 0.03, 0.10, 0.08
This behaviour was not present in RHEL 9.