changed sum reducer to find tot instances of each key instead of summing the values per key