It depends on hardware as you’re (probably) not using a theoretical computer but a physical hardware one, so you have limited resources.
Read: Does Windows have a limit of 2000 threads per process?
Furthermore, even if you could run 5000+ threads, depending on your hardware, that could run much slower than a 10 thread equivalent program. I think you should take a look at thread pooling.