How do I return a number in render arrays? I am building a module in Drupal 8. I am doing a query in database and I return the number of users and the number of nodes. I write of screen this numbers without errors, but I cannot write them in a block. 

This is the code I am using.

Module file

/**
 * Implementa hook_theme ()
*/
function my_module_theme() {
  return array(
    'my_module_test' =&gt; array(
      'template' =&gt; 'test',
      'users' =&gt; NULL,
      'questions' =&gt; NULL,
    ),
  );
}


The class implementing the block

  namespace Drupal\my_module\Plugin\Block;
  use Drupal\minka_qa_core\FormatUtils;

  use Drupal\Core\Block\BlockBase;

  /**
   * Provides a 'Bloco' block.
   *
   * @Block(
   *  id = "bloco",
   *  admin_label = @Translation("Bloco"),
   * )
   */
   class Bloco extends BlockBase {

     /**
      * {@inheritdoc}
      */
     public function build() {
       //$count = $this-&gt;countTest();
       $example = $this-&gt;test();
       $example2 = $this-&gt;test2();

       print_r($example);
       printf('\n');
       print_r($example2);
       //$questions = $this-&gt;countTest2();
       /*$build = [];
       $build['bloco']['#theme'] = 'my_module_test';
       $build['bloco']['#plaint_text'] = 'Questões';
       $build['bloco']['#users'] = $count;*/
       return [
         '#theme' =&gt; 'my_module_test',
         '#plain_text' =&gt; 'Questões',
         '#users' =&gt; $example,
         '#questions' =&gt; $example2,
       ];
   }

   public function test() {
     $query = \Drupal::entityQuery('node')
      -&gt;condition('status', 1)
      -&gt;condition('type', 'questoes');
     $nids = $query-&gt;count()-&gt;execute();

     return FormatUtils::formatNumber($nids);
   }

   public function test2(){
     $query = \Drupal::entityQuery('user')
      -&gt;condition('status', 1);
     $nids = $query-&gt;count()-&gt;execute();

     return FormatUtils::formatNumber($nids);
   }


}

The template file

&lt;div class="test"&gt;
  &lt;p&gt;Test twig template!&lt;/p&gt;

  &lt;p&gt;user: {{ users }}&lt;/p&gt;
&lt;/div&gt;


Why isn't my code working?
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',
    ],
  ];