 <p>Do you mean words or characters? If you want to count <strong>words</strong>, a very naïve approach is splitting by whitespace and check the length of the resulting array:</p> <pre><code>if ($("#et_newpost_content").text().split(/\s+/).length &lt; 250) { alert('Message must be at least 250 words.') } </code></pre> <p>If you mean <strong>characters</strong>, then it's much easier:</p> <pre><code>if ($("#et_newpost_content").text().length &lt; 250) { alert('Message must be at least 250 characters.') } </code></pre>