I currently not on pc but I will help.
1) load file using file = file.readlines
2) use text.split for the lines ex: countlines = text.split(file,"/n")
3) use text.split for words ex: countwords = text.split(file," ") use space as separator as words will be separated by space
4) get the length of array countlines and countwords and print on text window.
filep = File.ReadContents(filePath)
text = Array.GetItemCount(filep)
TextWindow.WriteLine(text)
For lines
1) load file using file = file.readlines
2) use text.split for the lines ex: countlines = text.split(file,"/n")
3) use text.split for words ex: countwords = text.split(file," ") use space as separator as words will be separated by space
4) get the length of array countlines and countwords and print on text window.
filep = File.ReadContents(filePath)
text = Array.GetItemCount(filep)
TextWindow.WriteLine(text)
For lines
ZS