further tree simplifying work, much work word counting work
Before changes, 3 counts wrong
third try