You can do this using window functions:
SELECT b.*,
(b.AUDTORG + CAST(b.SEQUENCENO AS varchar(255)) )as NewID,
count(*) over (partition by b.AUDTORG + CAST(b.SEQUENCENO AS varchar(255)) ) as Occurence
FROM ADXDAT.dbo.BKENTD b;
The over
clause is used by window function. In this case, it counts everything in a group. The group is defined by the partition by
clause. So, it counts everything with the same value of the new id.