counts lines in a text