getlines fetches linenumber,loopcount