Add Scripted Field in Kibana to Count Characters of a field and add show the count in another field

Look at this post: String size limit in painless / keyword field?

You can make the same in Index Patterns - Pick your index - Scripted Fields.
I think that code is counting the quotation marks so just add -2 to the operation.