Depends if that you want to do, and if this is ALL the code involved in accomplishing your task.

Your code needs to take into account whether %usersall already exists, so along with your /list command it should reset %usersall all to zero.
One way to do this is to have your variable exist only for a short time, under the assumption that there will not be a long interval between any 322's or between the 323 and the final 322.
You could instead use this command to update %usersall -> inc -u5 %usersall %users
because this deletes the %usersall variable after 5 seconds.

However that does not solve the problem where your window keeps on filling up with additional info each time you run the command. You should either have a command to clear the contents of @lista at the time the /list command is used, or:

if (*N/ofusers* iswm $line(@lista,1) clear @lista
... and hope you're not having the potential of having line 1 containing a channel topic or channel name containing that string.

Also, by default the @window lines is limited to the same options/other/window-buffer so you should ensure that your window will not contain the contents of the last 5000 lines:

if (!$window(@lista)) window -j99999 @lista 300 300 400 200

You should eyeball the syntax for the /window command to see if there are other switches you want to use, like having the titlebar not show the @ in the @windowname, etc.