Implement IO::Handle.lines(:count)