How can i monitor the decrease of an array’s count dynamically in SwiftUI?

⬆️ (for a bug fix on counting a array’s proportion of models that contains a certain value)

Oh I found out another way around my bug

my bug is that my todo list app’s done variables sometimes gets larger then my total todos when I delete one because I minus total by 1 but forgotten the done variable

How can i monitor the decrease of an array’s count dynamically in SwiftUI?
 
 
Q