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

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