pre-init counter variable before incrementing.

Change-Id: I97bd0a3b54d2c4ffcffab0e2d27be6b0518910be