title: Create Hash that matches keys and increments value
body: <p>I have a huge array that lists the day of the week in which the object was created, so I end up with an array similar to the following: </p>
  
  <p><code>["wednesday", "thursday", "friday"]</code> except that it contains 250,000 elements. </p>
  
  <p>What I want to make is a new hash that will match the key and increment the value, so the result is as follows:</p>
  
  <p><code>{"wednesday": 250, "thursday": 600, "saturday": 120}</code> </p>
  
  <p>How can I get achieve this outcome?</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>days = []
  
  Invitation.all.each do |invitation|
    day = invitation.created_at.strftime("%A")
    days.push(day)
  end
  
  days
  </code></pre>