Fixes #844 #5725 - correct hosts count in puppetclass

```Puppetclass.all.each(&:update_hosts_count)``` is faster,  https://speakerdeck.com/sferik/writing-fast-ruby