you actually only need a condition in that case. if you have more than 9990 shards it wont be a valid task and wont do it.
["condition"] = {
["(ItemCount(x) < 9980) and (ItemCount(y) < 9980)"] = true;
Alternatly
["condition"] = {
["ItemCount(x) < 9990"] = true;
["ItemCount(y) < 9990"] = true;
};
["condition"] = {
["(ItemCount(x) < 9980) and (ItemCount(y) < 9980)"] = true;
Alternatly
["condition"] = {
["ItemCount(x) < 9990"] = true;
["ItemCount(y) < 9990"] = true;
};