Data Logger to update data on SD Card

I need to build a data logger of sorts, more of a tally counter. The unit will requires a LARGE array and for the data to be persistent (ie., not lost when powered down). I'm thinking one method would be to use an SD Card for the persistent storage and to act as the 'array'. So far I have only used SD cards and data logging systems that append the data to the file, or start a new file and then append. The difference here is the data would needs to be updated. Such as: the product type is entered, the SD card is searched for the product, the quantity retrieved-updated-stored.

From the examples, the find and retrieve part looks easy enough. The update is easy (count++;) too. The question is, how do I then go about storing the updated number back in the place where it came.

An example:

Original:
Product A, 5
Product B, 2
Product C, 4

Update Product B:
Product A, 5
Product B, 3
Product C, 4

How do I rewrite the count back into the 'slot' as seen above?

Since you say it is merely a tally counter, what is the real objective?
Is it truly what you say, or do you need to know how many As there were when there were two Bs? If the former, the only line that counts is the last one, the only reason for an SD is for the event of some failure, and, depending on what you mean by large and which direction it is, you might find that an eeprom suffices.

It is just that a tally counter. Order does not matter as you suggest.

Products are independent. Count of the products independent. etc. The products will be "presented" randomly, so the count of any product may be updated at any time, in any order.

Products will be added, having 1k products to start and growing to 4k, 8k, 16k could be possible.

The product name will also need to be stored, which is why I'm steering away from the EEPROM. I haven't ruled it out, just comparing sizes (EEPROM KB versus SD Card GB). EEPROM or SD card would both be options to retain the counts for the products when the power is turned off.