Line ID and Line Sequence Number will match the first time the SO is built unless lines were inserted/deleted. For instance if there were 4 lines originally and a line was inserted before 4 then it's line sequence number would be 3 and the line ID might be 6 or 7. There are "hidden" lines which is usually why you have more than what the visible lines are. There's a tax line and typically a shipping line. Are you using a search to determine what lines you want to modify or just counting how many there are and looping through them? Take a look at SuiteAnswers 29621 and see if that helps... If you build a saved search in the user interface to show line id and line sequence number for the SO in question, you should see the extra lines.