Counter

I have a stable version of activity counter generation and signal backannotation. Please merge it at an appropriate point. I'll continuously update counter branch.