How Can I Count the Number of Lines in a File

In this code, we will take a simple text file and find how many lines it contains.

This is shown in the code below: