By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
DECLARE
cnt number;
BEGIN
select count(*) INTO cnt from dual;
IF cnt = 1 THEN
DBMS_OUTPUT.PUT_LINE('Exaclty one record');
ELSE
DBMS_OUTPUT.PUT_LINE('0 mo more than 1 record');
END IF;
END;
/
1 rows affected
dbms_output:
Exaclty one record