...d[hk]={}
    for sk, sk_df in hk_df.groupby('Subkategorie', sort=False):
        lines=[f"{int(r.Konversation_Nr):03d} | {r.Titel}" for r in sk_df.itertuples()]
        grouped[hk][sk]=lines

# count total
sum(len(lines) for hk in grouped for lines in grouped[hk].values()), len(df_list)