title: Find frequency of keys of dictionary from a list of dictionaries
body: <p>I am supposed to find out the frequencies of different keys in a list of dictionaries.</p>
  <p>For example:</p>
  <p>Input list of dictionaries:</p>
  <pre><code>[{'p1': 'val1', 'p2': 'val2', 'p3': 'val3', 'p4': 'val4'},
   {'p1': 'val5', 'p7': 'val6', 'p3': 'val7'},
   {'p1': 'val8', 'p2': 'val9', 'p9': 'val10', 'p7': 'val11'}]
  </code></pre>
  <p>Output format: Dictionary with key as keys seen in input dictionary, and values as a list containing frequency and list of values as seen in input. The order of keys in output does not matter.</p>
  <p>Output:</p>
  <pre><code>{'p1': [3, ['val1', 'val5', 'val8']],
   'p2': [2, ['val2', 'val9']],
   'p3': [2, ['val3', 'val7']],
   'p4': [1, ['val4']],
   'p7': [2, ['val6', 'val11']],
   'p9': [1, ['val10']]
  }
  </code></pre>
  <p>Is there an efficient way to do this?
  Thanks a lot for the help!</p>