it's better to init counter once, than do count on each iteration