How many categories can discourse support?

It depends how many patients you plan to have. Discourse isn’t designed for a situation where there are 10,000 categories. Even 1000 categories will be a bit of a problem performance wise.