num_lines function

Get number of lines