function [gavias_batiz]_preprocess_node(&$variables) { // Get statistics count for current node. $statistics = statistics_get($variables['node']->id()); $variables['node_stats'] = \Drupal::translation()->formatPlural($statistics['totalcount'], '1 view', '@count views'); }