add counter for key-exchange protocol