in reply to Threads reinitializing the variable

Looks like you're getting a proper count but throwing away all but the last return value... maybe you want to sum them all instead:
$ret += $t->join;