Auto-detecting of cpu count