How do I return a number in render arrays?
There is a mismatch in hook_theme(), template is "test", elsewhere "my_module_test". And the return array has three levels, with the keys variables and template in the second level and the twig parameters in the third:

  return [
    'loremipsum' =&gt; [
      'variables' =&gt; [
        'source_text' =&gt; NULL,
      ],
      'template' =&gt; 'loremipsum',
    ],
  ];