code: def line_count(fn):
      
  
      with open(fn) as f:
          for i, l in enumerate(f):
              pass
      return i + 1
docs: Get line count of file
  
      Args:
          fn (str): Path to file
  
      Return:
            Number of lines in file (int)