Im trying to count Input fields added by a popup

Im trying to count Input fields added by a popup

Hello,

Im trying to count Input fields added by a popup, but my event isnt getting fired. The input boxes are being added

<div id="CC" style="display:block">
                                                                        
 $("#CC").change(function(){                                           
  $("input[type=text]").each(function(i){                              
  if (i > 8) {                                                         
  alert("Too many addresss have been added to the 'CC' address field \ ...
  return;  
}                                                                    
 });                

How can I fire an event that will allow me to count my input boxes that are being added to my div.

Thanx