How many words are there? English is such an inefficient language. We've got enormous words when
there are plenty of two or three letter words we never used! As
computer scientists, every keystroke matters. We need to be more
efficient. Just think of how many words we could have had! In fact,
don't think about it, tell me.

Given a string (or list) of letters, I want you to output how many
words we could make using those letters. You must use every letter in the string exactly one time.

Words can't just be any old string of letters though, how would you
say "yffghtjrufhr"? To be a word, it has to satisfy the following
conditions:


It must contain at least one vowel ('y' is always a vowel).
There must be no more than 2 vowels in a row.
There must be no more than 3 consonants in row.
The combinations "ch", "sh", and "th" count as one consonant.
"s" counts as neither a consonant nor vowel ("length" is just as
valid as "lengths").


For example:

Input    -&gt; Output
a        -&gt; 1       (a)
b        -&gt; 0
ab       -&gt; 2       (ab, ba)
abbbb    -&gt; 3       (babbb, bbabb, bbbab)
abbbbbbb -&gt; 0
essss    -&gt; 5       (essss, sesss, ssess, ssses, sssse)
abbbth   -&gt; 46      (thabbb, thbabb, thbbab, bathbb, ...)


Obviously, since this challenge is all about character efficiency, I
think a code-golf challenge is in order. Standard rules apply!

(For clarification, an 's' breaks any streaks of vowels or consonants. The word "abbbsbbb" is ok, since there are no more than 3 consonants in a row".)
JavaScript, 275 bytes

a=&gt;(a.match(/[^aeiouys]/g)||[])[L='length']&lt;a[L]*.85|0&amp;&amp;[...Array(1&lt;&lt;(n=(a=[...a])[L])*--n/2)].map((_,b)=&gt;a.slice().sort(_=&gt;(b/=2)*2&amp;1?1:-1).join``).filter((a,b,c)=&gt;c.indexOf(a)==b&amp;&amp;/[aeiouy]/[t='test'](d=a.replace(/[cst]h/,1))&amp;!/[aeiouy]{3}/[t](d)&amp;!/[^aeiouys]{4}/[t](d))[L]


Try it online