You could also use one of these formulas, after using sort by (ID, Date). One formulas counts the number of times there is a date (any date) for a given ID, the second one counts the number of times there is a new date for a given ID (see rows 12 to 14 in screenshot).
If(Row() == 1, 1, If(:ID[Row() - 1,Empty()] == :ID, :Date# for that ID[Row() - 1,Empty()] + 1, If(:ID[Row() - 1,Empty()] != :ID, 1, Empty())))
If(Row() == 1, 1, If(:ID[Row() - 1,Empty()] == :ID, If(:Date[Row() - 1,Empty()] != :Date, :Unique Date# for that ID[Row() - 1,Empty()] + 1, :Unique Date# for that ID[Row() - 1,Empty()]), If(:ID[Row() - 1,Empty()] != :ID, 1, Empty())))
![9883_JMP forum.png 9883_JMP forum.png](https://community.jmp.com/t5/image/serverpage/image-id/2187iA1C9A600B4AB0ED9/image-size/medium?v=v2&px=400)