title: Finding the number of form elements
body: <p>What is the possible way of finding the total number of form elements using jquery? 
  To be clear, here is the code</p>
  
  <pre><code> &lt;html&gt;
       &lt;body&gt;
          &lt;form&gt;
          &lt;div&gt;
              Name
              &lt;input type="text" class="name"&gt;
          &lt;/div&gt;
  
          &lt;div class="radioselect"&gt;
              Yes
              &lt;input type="radio" name="same" class="radio"&gt;
              NO
              &lt;input type="radio" name="same" class="radio"&gt;
          &lt;/div&gt;
          &lt;div&gt;
              Comment
              &lt;textarea class="area"&gt;&lt;/textarea&gt;
          &lt;/div&gt;
      &lt;/form&gt;
       &lt;/body&gt;
     &lt;/html&gt;
  </code></pre>
  
  <p>In the above code, consider we need to find the number of form elements. By simple jquery, we can use the script like this:</p>
  
  <pre><code>$('input').length;
  $('textarea').length;
  </code></pre>
  
  <p>By this way we can find the total number of individual form elements. Suppose if we need to find the total number of such form elements for a dynamic form, what is the possible way of doing it? Because we cannot easily detect the type of form element present in them? Suggest me a possible way for this problem</p>