reduce cookie tracking (3/4): add a way to count cookies

Change-Id: Ibc1c8d3160a89de51531a89c5103b47ba2c2c649
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0