How do you restrict the number of items that can be selected?

How do you restrict the number of items that can be selected?

Okay so my system has a set of subscriptions and basically each location has a special number of subscriptions that they are allowed to have.  How can I restrict the number of subscriptions so that they do not over subscribe.