Implement a safety limit on the total number of functions.