var storyText=app.activeDocument.textFrames[0].insertionPoints[1].story; alert(storyText.lines.length);