Depends on what you are tring to do, use
Threadvar, or have similar array for that variable, one for each thread and give the thread its index in that array.
As a side note, this line is not safe if you have your threads started with FreeOnTerminate is True:
If Assigned(MyThreads[counter]) then MyThreads[counter].terminate;
and the thead will not end instantly after this call.