def register_from_packs(self, base_dirs):
        """
        :return: Tuple, Number of rules registered, overridden
        :rtype: ``tuple``
        """
        # Register packs first
        self.register_packs(base_dirs=base_dirs)

        registered_count = 0
        overridden_count = 0
        content = self._pack_loader.get_content(
            base_dirs=base_dirs, content_type="rules"
        )
        for pack, rules_dir in six.iteritems(content):
            if not rules_dir:
                LOG.debug("Pack %s does not contain rules.", pack)
                continue
            try:
                LOG.debug("Registering rules from pack: %s", pack)
                rules = self._get_rules_from_pack(rules_dir)
                count, override = self._register_rules_from_pack(pack, rules)
                registered_count += count
                overridden_count += override
            except Exception as e:
                if self._fail_on_failure:
                    raise e

                LOG.exception("Failed registering all rules from pack: %s", rules_dir)

        return registered_count, overridden_count

        :return: Tuple, Number of rules registered, overridden
        :rtype: ``tuple``
        
st2common/st2common/bootstrap/rulesregistrar.py