How to get the last row count of internal data file automatically using for loop

Hi,

I have created a data file of the type Internal Data and that file currently has 4 rows. Can you please help me to get the last row to loop through using For loop.