As Anacedent would say ... RTFM
Online Forms Builder Help offers you, for example, COUNT_QUERY built-in. Play with it a little bit ...
Or, you could also write a code by yourself:
cnt number := 1;
while :system.last_record = 'FALSE'
cnt := cnt + 1;
message('There are ' || cnt || ' records in this block');
Both have to be used in / called from triggers that allow use of restricted procedures.