'Return the total number of resources in a stack.
Includes nested stacks below.'

def total_resources(self, stack_id=None):

    if (not stack_id):
        if (self.id is None):
            return 0
        stack_id = self.id
    return stack_object.Stack.count_total_resources(self.context, stack_id)
