Anyone can try following two methods
under non-sys dba account using SQL*PLUS, and you will see
different reults:

1.
declare
cnt integer;
begin
select count(*) into cnt from all_objects;
dbms_output.put_line ( 'Found it? ' || cnt);
end;
/


2.
create or replace procedure test_sp
as
cnt integer;
begin
select count(*) into cnt from all_objects;
dbms_output.put_line ( 'Found it? ' || cnt);
end;
/

exec test_sp