Units with too many classes can be difficult to understand and maintain. Ideally, each class is self-contained and can be separated into separate units without loss of functionality.
Nested classes or one-liner classes such as
ECustomException = class(Exception); are not counted toward the limit.
Group classes with related functionality into new units, and remove or merge unnecessary classes.