change log.offset to be sum of count