Counter.php speed up

This way the queries are faster on big databases. Now it uses the indexed pk to count the users.