How to drive text based off of a value
i have created a blend example to show how to do this.
http://www.pasteall.org/blend/36360

Ill warn you that this is big hack. it will most likley not work if you submit this job to an external renderfarm, deppending on the renderfarm settings.

What we want to do is create a driver on a transform property of an unrelated empty. Then write a custom Python Driver that updates the Text.body string with the Scene.cycles.samples value.


create an empty
create a driver on the x transform (not too important which axis)
run script in text editor.
set up driver


Code:

import bpy

def update_driver():
        bpy.data.objects['Text'].data.body = "%i samples" %bpy.context.scene.cycles.samples
        return 0

bpy.app.driver_namespace["update_driver"] = update_driver


Run this code when you open the file. now our custom pydriver will be available in the expression field of the driver. If you have already entered the expression before running the script, you will need to click in the expression field, and press enter to update.

It is important to have this fake_driver variable connected to a transform property of an object. This 'hack' forces the driver to update on each frame.
In the driver we now enter update_driver() for the expression.



Depending on your settings, you may need to open the User preferences and turn on 'auto run python scripts' to allow our python driver to work.