in reply to Counting the number of replaces
s/<I>/$count++;"<italic>"/eg; print $count || 0; [download]