title: Output of ls | wc -l
body: <p>Normally the output of <code>wc -l</code> command gives the number of lines in a file.
  But, when we pipe the output of <code>ls</code> command to it, it seems to show the number of files and directories and links in the current working directory correctly.</p>
  
  <p>My question is that the output of the <code>ls</code> command displays names of some files and directory in the same line. So, why in this case using <code>ls | wc -l</code> gives the same output, as compared to <code>ls -l | wc -l</code>.
  Thanks in advance.</p>