I have configured MAC Limiting on EX2200.
There is option allowed-mac, which allows to add allowed MAC addresses statically.
How to add MAC addresses dynamically?
If I remember correctly, static mac addresses do not count towards the mac-limit you have configured.
So if you configure mac-limit as 4, you can learn only 4 dynamic MACs on the interfaces + any static entry you may have on that port.
user@switch# set switch-options interface interface-name persistent-learning