When its cursor or cursor variable is opened, %rowcount is zeroed. Before the first fetch, %rowcount yields 0. Thereafter, it yields the number of rows fetched so far. The number is incremented if the last fetch returned a row.