SELECT count(*) INTO devuel FROM clientes WHERE UPPER(apell) LIKEUPPER('%' || apelli || '%')
Ojo ...Esta instrucción siempre deja found en true dentro de un plpgsql
Silvio