as mention several times already, tr is probably best for single characters. Another solution, which is scalable to multi-charater delimiters, is to use split:
use strict;
use warnings;
my $str='abc%def%.%';
printf "pcount: %d\n", split(/%/, $str.' ')-1;