I don't get the relation between `i` and `count` here?