Scripts: Total dialogue spoken per character

Hey all, I’m not sure I’m posting in the right place, but was wondering if there was an easy way to get the total number of words spoken/dialogue for each individual character for screenplays, comic scripts, etc? And if not, whether this would be useful to include as a feature?

This article, breaking down dialogue by gender and age, got me thinking about my own work, and I’ve been trying to find a way to easily bring up these figures - pudding.cool/2017/03/film-dialogue/index.html

thanks and best regards,

Matt Gibbs