def METHOD_NAME(self, fp) -> int:
    idx = 0
    for idx, line in enumerate(fp.readlines()):
        line = line.strip()
        if not line or line.startswith("#"):
            continue
        comps = line.split(":")
        if len(comps) != 3:
            print(f"WARNING: invalid line `{line}`", file=sys.stderr)
            continue
        name, uid, count = comps
        self.db[name] = (uid, count)
    return idx