Here's a small script I threw together to check the number of DHCP leases in use on an Ubiquiti EdgeRouter. It has been tested on an EdgeRouter Lite, but will probably work with other EdgeRouter models. It's made for use with Nagios and can probably be used with other monitoring platforms.
It basically connects to the router via SSH, executes show dhcp leases and returns OK, WARNING, or CRITICAL depending on how many leases exist. See the comments for a little bit of documentation.