Code to count words and lines

Code to count number of words and lines in a given file.