Search notes:

Oracle: SYS_OP_COUNTCHG

sys_op_countchg is an aggregate function.
The first parameter is supposed to be a rowid… but let's try using a different datatype:
drop   table tq84_countchg;
create table tq84_countchg (
   val_1   number,
   val_2   varchar2(10)
);

begin
insert into tq84_countchg values ( 4, 'A');
insert into tq84_countchg values ( 4, 'B');
insert into tq84_countchg values ( 2, 'C');
insert into tq84_countchg values ( 2, 'D');
insert into tq84_countchg values ( 2, 'E');
insert into tq84_countchg values ( 5, 'F');
insert into tq84_countchg values ( 4, 'G');
insert into tq84_countchg values ( 5, 'H');
end;
/

select
   sys_op_countchg(val_1, 1)  cnt_1,
   sys_op_countchg(val_1, 2)  cnt_2,
   sys_op_countchg(val_1, 3)  cnt_3,
   sys_op_countchg(val_1, 4)  cnt_4
from
   tq84_countchg
--order by
--   val_1
;
--
--      CNT_1      CNT_2      CNT_3      CNT_4
-- ---------- ---------- ---------- ----------
--          5          4          3          3

See also

sys_op_countchg seems to be used to calculate clustering factor of an index.
sys_op_* functions

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758203971, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/SQL/functions/sys/op/countchg(74): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78