Count the number of elements within specfic div

Count the number of elements within specfic div

Hi there,

I have following code

  1. <div id="car_0>
  2.       <div class="card">
  3.              <input id="Max.Index" value="0">
  4.       </div>
  5.       <div class="card">
  6.              <input id="Max.Index" value="1">
  7.       </div>
  8. </div>
  9. <div id="car_1>
  10.       <div class="card">
  11.           <input id="Max.Index" value="0">
  12.       </div>
  13. <div>
How do I count the number of Max.Index inside each <div id="car_x>?

Joe