Finally, I figured out what I was doing wrong. In fact, they were a couple of things:
My theme() call was ok:
return theme('my_theme', $page_params);
But my hook_theme implementation wasn't. If $page_params is my array of variables, i cannot use the whole array as a variable, I have to explicitly specify which are my variables inside the array. Something like this:
function my_module_theme($existing, $type, $theme, $path) {
return array(
'my_theme' => array(
'variables' => array(
'items_per_page' => NULL,
'page' => NULL,
'total_items' => NULL,
'total_pages' => NULL,
),
'template' => 'theme/my_template_file',
);
}
And finally, inside my_template_file.tpl.php I will have to use the variable names directly instead of using them as a component of $page_params:
<?php print $total_items; ?>
It may seem obvious for experienced users but it took me a while until I realized this. I hope it can be useful for other beginners like me.