Add watcher function set_numprocesses.