cat fileName.txt | wc -l
At this command, using cat command you can output a file content. And using wc -l command, you can count the line. By combining both of them it will do the trick. First the cat will display the whole file content, and by piping(|) the wc -l command, it will count the number of lines from the cat's output content.
May be someone can provide better ideas/solution to do the task.