the get contents from recordset behavior uses a recordset loop.
inside the loop, you will need to add code to check which ID is currently being added, look up the count of times that id occurs in your string, then use that value to set the quantity.
the first few lines look like this:
<?php
// WA eCart Get Info From RS
if (eCart1->IsEmpty() && isset($totalRows_recordsetName) && $totalRows_recordsetName > 0) {
$Redirect_redirStr="";
do {
$eCart1_itemID = floatval("".$row_recordsetName['ProductID'] ."");
}
$row_recordsetName['ProductID'] is the current ID being added, use that to look up the quantity in the session