The problem with such a setting is that in order to have a global maximum number of ads on a page, you need to first be able to define which ones will be displayed in case you have more than X ads. This is not trivial since you can inject ads using the settings but also using the widget and using the shortcode.
Second considering the adsense limitation, it allows you 3 ads and 3 link units. Defining this is even more difficult.
Third you might have (at least I do on some of my own pages) other kind of ads (e.g. from the amazon partner program). This ones shouldn’t be accounted for.
The easy solution would be to stop injecting ad blocks after X have been injected, no matter which ones they are. So if your theme first writes the contents of the post, they will most likely stay and the one from the sidebar will be missing. If you theme first outputs the sidebar, it will be the opposite. Not sure whether such a simple solution would already help…
So still trying to figure a good way to implement it, making it not too difficult to configure, fast enough and able to handle the different scenarios above…