i have a problem in my script

i have some users who signed up and i want to be able to update this other table with how many users i have that are signed in. so i want to count those rows only