in reply to Counting the number of replaces

Yes, just evaluate your regexp in scalar context, eg:
$num_replacements = $_ =~ s/<I>/<italic>/g;

Cheers,
Darren :)