today:
199
yesterday:
221
Total:
1,109,855
If you want to use EXISTS in a PL/SQL function returning BOOLEAN,try this
DECLARE
  v_exist NUMBER;
BEGIN

SELECT 1 
INTO v_exist
FROM DUAL WHERE EXISTS (select id_referencia 
                                 from items
                                 where id_referencia = :P2_REFERENCIA)

  IF v_exist IS NOT NULL
  THEN
    RETURN true;
  ELSE
    RETURN false;
  END IF;
END;