Use helper to pack counter.

Wasn't available in the webworker.