update cStringIO counter