Limiting number of users per site

Is there a way to limit the number of users per site based on pro site levels? I would like free sites to be only allowed 1 user, Level 1 - 1 user, Level 2 - 5 users, and Level 3 - 10 users.