Count the number of text type records

Hello everyone,

I need to count a string field, to create a percentage graph. I've tried script fields but this one doesn't work with typos string.
I wear this:

Any ideas ?, thank you very much

Can you describe your use case a bit more. Do you want the unique count of string fields? Have you tried cardinality aggregation