added total count support to serializer