How to get row count in a datatable?

I’m getting 999 even if my excel has 10 rows

Hard to tell, if you don’t share your code ?
But if you are reading using Get Range, make sure to set empty rows to true ( or fix the excel sheet and remove empty lines )

Got the solution. By default in Read Range activity , “Ignore empty rows” will be false , if we set it to true. It will work.