Added cache support for total count

Added wfDebugLog statements
Fixed variable name
Log message was wrong

Change-Id: Iffee6831d391b9103fc639260405d207ead3d814
Merge "Added cache support for total count"