title: How to get number of lines of file in prolog?
body: <p>I know that there is a predicate :</p>
  
  <pre><code>line_count(Stream, LineCount)
  </code></pre>
  
  <p>but this predicate get how many numbers you are reading or writing ?,
  I need to append a file and before appending it, I need to check the number of the lines that have been inserted, So Is there any way I can do it with ?</p>
  
  <p>Thanks,</p>