Can't get the equal function to work using two functions as arguments

The below gives me the number of open "(" in the title.
$sub($len(%TITLE%),$len($replace(%TITLE%,$char(40),)))

Using ascii code 41, it gives me the number of ")" in the title tag.

Now, if I put both inside of the $eql function to see if they match, it doesn't work. Ideas?

Edit: Subtracting them works though, that's a way out.

How did you apply the equal function?
Usually, it is part of a $if()-statement like $if($eql(...
$if($eql($len($replace(%title%,')',)),$len($replace(%title%,'(',))),yes,no)

If you are looking for files with not matching pairs of brackets, you could also use such a filter:
%title% HAS "(" AND NOT %title% HAS ")"