question: get line count of file `filename`
  
target: 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 
  