The effect of piping to
tee is that whatever your first command writes to its standard output is written to a file (whose name you passed as a command-line argument to
tee) as well as written to the standard output of the
tee command. If the pipeline doesn't continue and you don't perform any redirections on the
tee command, then
tee's standard output is that of your shell, usually your terminal.
That's why running
who and running
who | tee test show the same text on your terminal. The difference with
tee you also write it to a file.
If the pipeline continues, as with
who | tee test | wc -l, then whatever standard output would have been written to the terminal is sent to the next command in the pipeline instead. This is the
wc command and, unlike
wc does not copy its input to standard output (or anywhere). Instead it shows statistics. With the
-l option it shows just line counts, so that's all you see.
So the reason you see just
who | tee test | wc -l is the same as the reason you see just
who | wc -l. The
tee command writes the output of
who to a file but it does not cause it to be printed to the terminal unless its standard output is the terminal. By default it usually is, but not when you pipe it to yet another command.
If you've seen a command on the left side of a
| whose output is displayed on the terminal rather than being used as input to the next command in the pipeline, then it likely was writing to standard error instead of standard output.