added global counter to rule for counting activations.