If you don't want to clobber the $testString contents, you could change as below, and add parentheses for clarity (not sure if that is returning in a list context, then assigning to a scalar, but I have seen that idiom many times before).
my $l_count = ($testString =~ tr/(/(/);
my $r_count = ($testString =~ tr/)/)/);