fixup the Counter API, and add to declarative
Merge branch 'counter'
Merge pull request #24 from lpotter/master

fix-up Counter API, and add to declarative