<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _link(self, base_dir: str, artifact_map: dict, conf: Config):
 """Link all artifacts in `artifact_map` under `base_dir` and return the number of artifacts linked."""

        num_linked = 0
        for dst, src in artifact_map.items():
            abs_src = join(conf.project_root, src)
            abs_dest = join(conf.project_root, base_dir, dst)
            link_node(abs_src, abs_dest)
            num_linked += 1
        return num_linked