[PATCH PM-QA v2] Simplify code to obtain number of cpus for a platform