#18346 patch. Counters with period=0 will not saved to session