title: Count of days of each month from a list of dates python
body: <p>How can I count the number of days of each month for current year from a list of dates in <em>python</em>. Consider I have a date list as: </p>
  
  <pre><code>10/Mar/2016 06:39:31
  16/Nov/2015 06:16:27
  16/Dec/2012 06:39:31
  16/Dec/2015 06:16:27
  9/Mar/2016 06:16:27
  15/Nov/2015 06:16:27
  15/Mar/2012 06:39:31
  15/Nov/2015 06:16:27
  15/Sep/2015 06:16:27
  15/Jan/2015 06:16:27
  16/Feb/2016 06:16:27
  16/Jan/2016 06:39:31
  16/Feb/2016 06:39:31
  15/Feb/2012 06:16:27
  12/Mar/2016 06:16:27
  16/Nov/2012 06:16:27
  8/Jan/2016 06:16:27
  10/Mar/2016 06:39:31
  16/Nov/2012 06:39:31
  16/Nov/2012 06:16:20
  7/Mar/2016 06:16:27
  15/Nov/2012 06:16:27
  16/Jan/2016 06:16:27
  16/Oct/2015 06:39:31
  </code></pre>
  
  <p>Now I want <code>Jan-3</code> , <code>Feb-2</code>, <code>Mar-5</code> and so on.</p>
  
  <p>I tried  </p>
  
  <pre><code>from datetime import datetime as date_for_conv
  if(times&gt; date_for_conv.strptime(times, "%d/%b/%Y %H:%M:%S").strftime("2016/Jan/%d")):
      jan+=1
  </code></pre>
  
  <p><code>times</code> is the list element iterated in a loop. This gives the count for Jan month only, I want to do it in a single condition check. What should I do?</p>