Could you advise on what I need to do to count the number of lines in a given file, and then write oout the result, along with the filename to another file.

Thanks.