I have a text file which has over 60MB size. It has got entries in 5105043 lines, but when I am doing wc -l it is giving only 5105042 results which is one less than actual.
Last line does not contain a new line.
One trick to get the result you want would be:
sed -n '=' | wc -l
This tells sed just to print the line number of each line in your file which wc then counts. There are probably better solutions, but this works.
sed
wc