Numbering in sequence issue.combine two list items in sublist into one without isolating the other item


Hi guys,
I have this issue in numbering in sequence. I managed to tag and numbering my equipments in sequence and into correct orientation, however, each equipments are treated all uniquely, and what i mean by that way, say if i have the similar family equipment side-by-side or close proximity, it will number each uniquely, 001, 002, 003 and so forth. Thats not my intention though, i wished to cluster those similar item nearer to each other into one item number. If u can look at the image I posted, the same item is grouped together under the sublists (List.GroupByKey node). but i used list.firstitem node and it only captures one of the two equipment. so when i ran the script, it adds the number into one but leave the other empty. how do i go about . Any guess? Thank you in advance