set entry number when writing header and event(s)