The formula for Flesch-Douma requires two things to be counted: number of words in a sentence and number of syllables per word. While the number of words in a sentence is easily counted with any scripting language, the nr of syllables may seem more difficult. The [ http://hdl.handle.net/10032/tm-a2-h2 e-Lex] lexicon contains hyphenation patterns and hence the number of syllables per word. An alternative is to count the number of vowel clusters in each word using regular expressions, which should also give you the number of syllables.