Added a length getter for Text

- Renamed `Text::$totalLineNumber` into `Text::$nbLines` (sounds better to me, can be discussed :smile: )
- Added a `Text::getNbLines()` method
- Used this new getter in some different places

Edit: the property is now called $length. Getter has been updated accordingly