There's no template operator for random numbers in eZ publish 3.0. If anyone feel up to it they could make it and upload it to contributions, it shouldn't be too hard to make.
The key here is to use the rand function in php http://www.php.net/manual/en/function.rand.php
I have made a template rand operator that use PHP rand function as suggest Jan. You put {rand(0,5)} in your template and you get a random integer between 0 and 5. It's my first extension, and it works ! Should I upload in contributions ?