Is it possible to get the server's CPU core count through a website of it?
As of today, most websites are no longer hosted by the owners themselves, instead there are massive server farms managed by companies like Cloudflare or other providers. This way, managing a website from a company PC for example feels still very easy and like before, but in fact you only see an interface provided by your chosen service provider. Doing so is most likely much cheaper than hosting it yourself because on a single server there are multiple websites, which share the given hardware. Like that, if a website does not need high capacities at the moment because there are less requests than usual, the spare capacities can be given to the other websites in order to make them faster/more reliable.
The other way around, if your website needs to handle more requests than usual, it profits from the unused hardware of the other sites. In reality this is of cause much more complicated as different services are probably run inside of containers or other solutions, but I think you get the idea.
The other reason for outsourced hosting is the reliability. External companies are less likely to have big problems, as they have more people trained on solving them, and if they don't they simply lose customers.
Conclusion: any given website you would like to check, which is probably not your own, otherwise you would just look into the control panel, is probably hosted on a big server with several other websites, and they share the RAM, the core and so on. If you don't exactly know that the other websites do nothing at the moment you want to test, it is merely impossible to get the number of cores handling your request(s).
Is it possible to get the server's CPU core count through a website of it?
It is possible if and only if the owner of the server has configured a website that tells you the core count.