Add fact that counts number of managed resources

The resources managed by Puppet are listed in a file in the
Puppet statedir. The file can be configured by the $resourcefile
setting, and defaults to /var/lib/puppet/state/resources.txt.

This file is available since commit 7a39ca7, solving issue #8667,
which is included in version 2.7.4.