intent: get line count
rewritten_intent: get line count of file `filename`
snippet: def bufcount(filename):
      f = open(filename)
      lines = 0
      buf_size = (1024 * 1024)
      read_f = f.read
      buf = read_f(buf_size)
      while buf:
          lines += buf.count('\n')
          buf = read_f(buf_size)
      return lines