Using a number for limiting registering or banning on multisite

Not sure if this is want you are looking for, but one approach could be hiding the registration altogether for all user, but the users from countries and territories you need.
Here is a plugin I’ve been checking out myself, but I must admit, I haven’t used it on a production site yet. It looks solid, though:

WP-Geolocation-JS

error code: 523