Optimized numProcess updates by checking for > pids