Make counter a property of the duck so it is synchronized

Fixes #3135