adding .count, .optout and .cancel_optout + tests