Use helper to pack counter.

Wasn't available in the webworker.
Merge pull request #277 from arlolra/packctr

Use helper to pack counter.