Obtains the total number of lines either input from or output to the open text stream Stream and unifies it with Count.
stream_object, must be ground
A valid open text stream.
The resulting line count of the stream.
A freshly opened stream has a line count of 0, i.e. this predicate counts the number of newlines seen. When a line is input from or output to a non-interactive Prolog stream, the line count of the Prolog stream is increased by one. Line count for an interactive stream reflects the total line input from or output to any interactive stream, i.e. all interactive streams share the same counter.
The count is reset by
Stream errors (see ref-iou-sfh-est).