Reads a file a tells how many lines it has.