Global Counter

new implementation