The SpecialStatsAddExtra hook lets you add statistics to Special:Statistics as follows:
public static function onSpecialStatsAddExtra( &$extraStats, RequestContext $context ) {
$extraStats['some-message'] = 333;
}The string used to index $extraStats is however directly passed to wfMessage(), meaning it's not possible to dynamically generate multiple statistics using a system message like e.g. number of $1, which seems like an oversight.
Since Messages cannot be used as an indexing key, this would require a somewhat different API ... perhaps $extraStats[] = [wfMessage('my-message', $myParam), 333];.