Calculating Line No

Hi All

How can I calculate Line No if I want to insert new line. Is this calculation already exist in standard and if it is in which?

Check AutoSplitKey property in Forms and its conditions