def write_dfs_to_filepaths(dfs, filepaths):
    """
    Accepts a list of pandas dataframes - dfs
    and a parralel list of filepaths - pathlib path objects
    Writes the dataframes to the filepaths as csvs with no index
    Returns the number of files written integer
    """
    n = 0
    for df, filepath in zip(dfs, filepaths):
        if not filepath.exists():
            filepath.parent.mkdir(parents=True, exist_ok=True)
        df.to_csv(filepath, index=False)
        n += 1
    return n