Sanitizing condition for containing compound $query to work for count()