@VB_Tech_pro - I am thinking something like this…
Everytime when you extract the invoice Number you can add it an array (using Add to Collections)…So your array will be something like this…ex:(ABC123,ABD456,ACD456 ADC456,ACD456, ABC123,ACD456)
And then get the count of each item using this post…How to count duplicate strings in an array - #3 by ppr