XenForo doesn't impose a limitation, but the node_id column is a 32-bit unsigned integer. That means you can only have up to 4,294,967,295 nodes (forum categories).
If you end up with more than 4.3 billion forum categories, it's simple enough to change the node_id column to be a 64-bit number instead of 32-bit. Doing so will allow you to have up to 18,446,744,073,709,551,615 nodes. So don't plan on having more than 18 quintillion forum categories.
I suspect you would start having bandwidth issues (just because of the size of the HTML page) for users when they are on your main forum page if you had more than 1,000,000 categories.