Number of columns is not limited explicitly.
1000 columns will work Ok.
More than 1000 columns is not tested in production.
I assume that 10 000 will work poor.
It because in MergeTree table, there are two files for each column in each data part. Data part is created for each INSERT, and data parts are merged in background.
It should work normally if you will INSERT data in large enough batches.
(Maybe, you will need to increase max_memory_usage)
I suggest you don't try 100 000 columns... Maybe it will work for table of type Log and StripeLog. Most likely, there will be not enough memory to insert data in large batches, and if you insert in small batches, performance will be worse. Consider batches of 8192 rows. Then, if each value is UInt32, it is 3.2 GB. Seems possible, though.