Create hundreds or thousands groups/categories?

Tons and tons of groups should be fine, more than 500 or so categories is not great and 5000 categories will be pain-town.