Have you checked out the Task page in the wiki?:
http://www.eqemulator.net/wiki/wikka...goryTaskSystem
Specifically, the perl commands:
http://www.eqemulator.net/wiki/wikka...kSystemPerlAPI
updatetaskactivity(task, activity[, count])
If the specified task is active, the donecount of the specified activity is incremented by count. count defaults to 1 if not specified.
Basically, you don't need to store that info for tasks. Just make it a deliver step for the activity. If you prefer to have perl handle it, then you just deal with it like a normal turn in and do the update within the handin plugin.