I read/interpret your requirement as you want to show how many users are registered, meaning the amount of records you have in your database of users registered. If that’s the case it’s perfectly valid to just do a standard SQL query on your database and count the records every page view. Most databases don’t break a sweat.
The idea behind it would be; Make it work, Make it right, Make it fast. In that order. (I believe this is coming from Kent Beck). I guess you can also add; while making it work, keep it as simple as possible at first.
A database can do 100s of queries per second, most of the time it can even keep your query ‘hot’ in memory as if you’re using a key value store like redis. If it actually becomes a problem you can make it fast by caching. But now you have another problem; cache invalidation, because if you have 2 app servers you have to coordinate the cache invalidation.
Finally when making it fast, please measure! (i have just replaced a very “fast” piece of code in ETS replaced with normal elixir maps which seem to be faster after actually measuring)
If the above interpretation of your question is not correct and the question is more about ‘live’ users visiting your website then it would be better to directly go for presence as this is better suited for that use case.
Have fun while coding!
(EDIT: just to give you an idea, look at these numbers: https://www.techempower.com/benchmarks/#section=data-r18&hw=ph&test=db they show you how fast a DB can be on top of beefy hardware. And it’s not even that expensive you can rent this kind of hardware with ovh or hetzner for around 70-100 usd per month.)