You could
Code:
cut -d, -f1 < MailingList | sort -u | tee /dev/stderr | wc -l
Isn't exactly the same, since stdout isn't going to the terminal. But if you are only worried about it arriving to the terminal, no matter if from stdout or stderr, then it works.
And you can also
Code:
exec 3>&1; cut -d, -f1 < pendientes | sort -u | tee /dev/fd/3 | wc -l; exec 3>&-
Once again what goes to the terminal isn't stdout but the file descriptor #3. But in this case the output will not be mixed with stderr.
Tee must be used yes or yes. The '|' redirects the stdout to the pipe, so stdout doesn't goes to the terminal anymore. If you want it to go to two different places you need two copies, that's what tee does.
Your "3>&2 2>&1 1>&3" puts stdout in stderr and stderr in stdout. But since stderr is empty...