Don't hang for $CPUS=1.

echo prints a newline if it has nothing to print, so wc -l always returns at least 1. Fix: echo -n