in reply to Counting the number of replaces
$num_replacements = $_ =~ s/<I>/<italic>/g; [download]
Cheers, Darren :)