It is impossible to say something like "this hardware will able to simulate that much virtual users" as the maximum load you can produce from hardware strongly depends on the nature of your test.
For instance, if your test is simple hammering one or several pages with GET requests - you'll be able to simulate X users.
If your test assumes massive pre/post processing, uses parametrisation and assertions, - it will be less, i.e. X / 2.
So I would go for the following:
- Make sure that all the recommendations from JMeter Performance and Tuning Tips are applied
- Start with i.e. 100 concurrent users and mention how much CPU and RAM are used
- Increase concurrency to 200, measure CPU/RAM once more
- Continue increasing concurrency till resource consumption reaches ~80% of total CPU or RAM, whatever comes the first.
This will give you an idea what will be hardware requirements for 5000 concurrent users for that particular load test.
Also be aware that 5000 concurrent users doesn't necessarily mean 5000 requests per second as users need some time to "think" between requests, they don't hammer application non-stop, so think time + page load time needs also be considered.
For instance, if user thinks for 10 seconds between requests and page load time is 2 seconds, it means that each user can do 5 requests per minute.
5000 users will do 25000 requests per minute which is ~415 requests per second and this load can be produced by single modern mid-end hardware. If you decide to go that way - simulate throughput instead of concurrency - take a look at Constant Throughput Timer