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.
Yes, provided on the server there is a 4,294,967,296 *4 = 17,179,869,184 bytes spare memory
to store just the addresses of the forums/categories.
Would you like to give a name for them?
That would cost another 17 billion bytes provided it's possible to do so with one character(signed or unsigned character)...
...but probably it's not possible so... 17 billion * x...