How to count the number of occurrences of dictionary keys

Dear TobiasHt:

Thank you for your reply.
I only know how to print the value corresponding to a specific key.
But when I count the dev dataset, I don’t need to care about which conversation it comes from, so the second key value can take a random value. I only care about the number of emotion statistics corresponding to emotion in the dev dataset. Could you please help me to fix this issue?
Thanks. This is attached the original data
https://raw.githubusercontent.com/declare-lab/MELD/master/data/MELD/datasets.yaml

config[‘dev’][‘random value’][‘Emotion’]

config[‘dev’][‘dia0_utt0’][‘Emotion’]

import yaml

from collections import Counter

config = yaml.load(open(’…/content/drive/MyDrive/mfcc_preprocess/melddatasets.yaml’, ‘r’, encoding=‘utf-8’).read())

emotion = config[‘dev’][‘dia0_utt0’][‘Emotion’]

print(emotion)