added total count support