custom count serializer