How to get number of all elements in values of dictionary, where is value is a list, give the int number python
<p>I have a dictionary where the values are lists, and I would like to know how many elements in lists associated with each key. I've found here this one. But I need total number of elements only for one key. for example for </p>

<pre><code>&gt;&gt;&gt; from collections import Counter
&gt;&gt;&gt; my_dict = {'I': [23,24,23,23,24], 'P': [17,23,23,17,24,12]}
&gt;&gt;&gt; {k: Counter(v) for k, v in my_dict.items()}
{'P': Counter({17: 2, 23: 2, 24: 1, 12: 1}), 'I': Counter({23: 3, 24: 2})}
</code></pre>

<p>For example <code>{P:6}</code>, will be better if it give just number, <code>count_elements=5</code></p>
