Why not use 
```multiprocessing.cpu_count()```
(https://docs.python.org/2/library/multiprocessing.html#miscellaneous)