Added support for total items gained quota.

An activity can determine if it is done by checking how many items it
has gained with the given quota.