title: Bug in my Ruby counter
body: <p>It is only counting once for each word. I want it to tell me how many times each word appears.</p>
  
  <pre><code>dictionary = ["to","do","to","do","to","do"]
  string = "just do it to"
  
   def machine(word,list)
     initialize = Hash.new 
  
     swerve = word.downcase.split(" ")
  
       list.each do |i|
         counter = 0 
  
           swerve.each do |j|
             if i.include? j 
               counter += 1 
           end
         end
         initialize[i]=counter
       end
       return initialize
     end
  
   machine(string,dictionary)
  </code></pre>