fix count for mem tracker