Hi!, im new in Pascal-Lazarus and I'm working on a SuperMarket software, I'm getting information from a database which is showed in a TDBGrid, after that, I use a button to add the name from the Item that is being showed in the TDBGrid into a ListBox, but if I do it several times the name starts to stack over and over again, and I'm trying to count how many times the item that I'm adding is written in the ListBox and just add a numer at it's left, for example, if 'Sugar' is written 4 times in the ListBox, what I want is to write '4 Sugar', but I can't figure out how to do that, it would be great if u guys can help me.
PD: Sorry for my bad english, I'm a Spanish speaker and I'm not very good at English