There is no programmatic limit, but there are practical limits. Deeply nested structures are difficult to manage. Three levels of categories should be sufficient for most situations. Note that there is always at least one level of categories. Since the Course category always encompasses all other categories and grade items it cannot be deleted.