The problem is that many of the standard potions are instant-effect, so they stop counting towards the limit immediately. IIRC the inventory menu keeps a count of how many potions you drink while it's open, but that resets when you close, and you can immediately re-open for another batch. You could add a menumode block to count for yourself, but that won't catch the hot-key use.
You'd probably be better off providing a more meaningful limit of your own, like a minimum time since you last drank one, if you can catch the "drink potion" event.