Applying custom activity counter