HELP! how to restrict form after a number of entries

Help!

I am running an event that has a maximum number of people who can attend. does anyone know of a way that I can restrict the form once I have had a certain number of entries?