Error counting data on Google sheet

Hi,

I have a very simple Excel/Google sheet showing two different vanity sizes for a project.
The “730+30” and “1600x300+30” appears 777 times and 51 times respectively when counted by hand using Excel.

I have copied and pasted the exact same data to Google sheets and asked Gemini to count how many times each items appear on the sheet and it is giving me some odd counting;

"Summary:

The string "730+30" appears 1972 times in the sheet.

The string "1600x300+30" appears 64 times in the sheet."

I am trying to identify what can be wrong and why I am not getting this simple task correctly.

Thank you.

Here is the original data from Excel;

730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30 730+30
730+30
730+30
730+30
730+30
1600x300+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30
730+30
730+30
730+30
1600x300+30
1600x300+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30 730+30
730+30
730+30
730+30

Hi @A_P, Generally llm’s process text as a continuous stream of tokens, focusing on generating coherent responses rather than performing exact calculations. They lack the built-in ability to keep an accurate count of specific words or phrase. So it is better to count them Programmatically instead of giving them to llm. Thank You.