public static function count_templates($context, $includes) {
        $params = self::validate_parameters(self::count_templates_parameters(), array(
            'context' => $context,
            'includes' => $includes
        ));
        $context = self::get_context_from_params($params['context']);
        self::validate_context($context);

        return api::count_templates($context, $includes);
    }