Xd 537 - Refactor analytics & implement Counter REST