o se vuoi far lavorare MySQL usi:

SELECT MAX(id) FROM users

e

SELECT COUNT(*) FROM users