Added counters for lines, words and bytes by changing reduce-f