The first problem you have is that you are looping through your items three times when you only need to do it once, this leads to more confusion and more opportunities to introduce a logic error. The logic you want/need to calculate the scrap for each item type is unclear, but here's a simplified version of what you have that should make it much easier to figure out:
case "ticket":
int totalScrap = 0, scrapPart1 = 0, scrapPart2 = 0, scrapPart3 = 0;
var totalItemCount = Trade.OtherOfferedItems.Count;
foreach (ulong id in items)
{
var itemType = Trade.OtherInventory.GetItem(id);
//i assume you want each scrap part to be a cumulative total,
//so we'll add it to what we already have (+=)
switch(itemType.Defindex)
{
case 5000:
scrapPart1 += totalItemCount;
break;
case 5001:
int Count = 0;
Count = totalItemCount * 3;
scrapPart2 += Count / totalItemCount;
break;
case 5002:
int Count1 = 0;
Count1 = totalItemCount * 9;
System.Console.WriteLine(Count1);
scrapPart3 += Count1 / totalItemCount;
break;
}
}
//now that we are done calculating all the parts,
//now let's calculate the total
totalScrap = scrapPart1 + scrapPart2 + scrapPart3;
System.Console.WriteLine(scrapPart1);
System.Console.WriteLine(scrapPart2);
System.Console.WriteLine(scrapPart3);
System.Console.WriteLine(totalScrap);
break;