correcting size serialization for counters