Fix initSiteStats.php maintenance script

It appears not to have worked for some time, as it either calls a protected
function ($counter->refresh()) or an undefined function
($counter->update()) depending on the parameters specified.

Bug: 65214
Change-Id: Ia7d867792b84c98714ec6dbbfef09745e875c8bc
(cherry picked from commit babe76221c258093cc22029a6188e6cd6783ed00)