Count users and check if they exist before trying to insert.