I need to implement kind of a hit counter for the entire page (so how often the site was visited) in D7.
For D6 we got the Counter module, but is there any simple way to do it? Perhaps with a custom block and some PHP code?
You could use the core Statistics module as described here.
You could use Visitors module.
I use Google Analytics but this might be too heavy if you need a basic solution.
You could use the mostpopular module for this.
For more detail about the module you could visit this.