Counting No.of rows in TXT file?

Could you please help me out for counting no.of rows count in .TXT file??

int count = File.ReadLines(path).Count();

Thank youu