Pyton Count se envía en un archivo de texto

fname = "gettysburg.txt"

num_lines = 0
num_words = 0
num_chars = 0

with open(fname, 'r') as f:
    for line in f:
        words = line.split()

        num_lines += line.count(".")
        num_words += len(words)
        num_chars += len(line.replace(' ', ''))
Xerothermic Xenomorph