Find the number of rows in Internal table

There are 2 ways to find the number of rows present in Internal table.

 1. Using describe command
DESCRIBE TABLE itab LINES test.
Here itab is the internal table and test in the integer/numeric data variable.

2. Using Lines command  
test = LINES( itab ).