dot-safe_n_workers function

Internal: choose a safe number of workers