Thank You Tursiops!
Your solution is obviously logical and simple instead of my search for a roundabout way. By using simple difference value I get this:
if ($1 != 0){
dci=FindDCIByName($node,"TotalCount");
cur=GetDCIValue($node,dci);
if (cur == null ) cur=0;
PushDCIData($node,dci,cur+$1);
}
return GetDCIValue($node,$dci->id) + $1;