Problem Statement
Most platforms now have a way to get the CPU count.
Solution Brainstorm
In browsers navigator.hardwareConcurrency has been around for a while. Safari apparently caps this as 2 for iOS and 8 for macOS.
Node.js has had os.cpus() since pre v1.