less hacky way to count CPUs