You can use one of the followings to count the number of lines in your file:
$ awk 'END{print FNR}' filename
$ awk 'END{print NR}' filename
$ awk 'BEGIN{i=0}{i++;}END{print i}' filename
$ awk '{i++;}END{print i}' filename