fix-up Counter API, and add to declarative