Total count implementation