How to Set a Property Value in Blender Game Engine?
Here is one way of setting the property value of a game engine object (which has an int property by the name 'upkeycount')

I have setup the following logic on a cube object

Sensor:Keyboard('UPARRAOWKEY') &lt;--> Controller:Python(increment_up_count.py) &lt;--> Actuator('upkeycount')

and following is the code for increment increment_up_count.py

import bge

cont = bge.logic.getCurrentController()

sensor = cont.sensors['UPARROWKEY']

if sensor.getKeyStatus(bge.events.UPARROWKEY) == bge.logic.KX_INPUT_JUST_ACTIVATED:
    owner = cont.owner
    upkeycountAct = cont.actuators['upkeycount']
    value = owner.get(upkeycountAct.propName) + 1
    upkeycountAct.value = str(value)
    cont.activate(upkeycountAct)


Few variations of the above code can be found at https://gist.github.com/satishgoda/5682945