Words counter with a hash
It is about inject initial value when you give Hash.new(0)
and call c[w] += 1 in block it is expanded to c[w] = c[w] + 1 as we said
to Hash initializer if it has no key then key will set to 0 when
first appeared.
c here is an accumulator and instance of inject initial value.
accumulator value will be set to return value of the block after
every turn. we are returning c because of this. it can be type of
any object. (1..10).inject(0) {|a,x| a + x } for example it is
Fixnum here.