add logging and avoid alloc on increment

This is a bit of a micro optimization, but since counters should be as light-weight as possible, and the var involved is already private, this seems like a reasonable thing to do.