Fix use before initialisation on cpu_count.