All you need to do is:
Create 2 actors (One text actor-"MyTextActor" and one other actor-"MyOtherActor") If you wish, you can also just use this script on only one text actor.
Now:
1. MyOtherActor --> Event: KeyDown
2. Action: CreateActor --> Script
3. Enter this script: MyTextActor.textNumber=MyTextActor.textNumber+1;
Run the program. Each time you hit the key that you selected in the keyDown Event. The textNumber will be incremented. HTHs...
******************************************
if you want to use ingsan's code use this script:
// Increments "MyTextActor" by 1 for each keyDown Event
int count=0; //create variable "count" to hold your number
if count>=0;//test variable "count" value if greater than or = to 0 keep doing the increments
MyTextActor.textNumber=MyTextActor.textNumber+1;//change the screen text string to match the number in the variable "count"