adding the script to fetch the number of lines