Count fields in omniGraffle

Hello everyone, I want to create timetables with OmniGraffle. An Apple script is supposed to help and count the hours of placing cards of a certain color. Unfortunately, I’m a beginner at Apple Script and grateful for any advice. Can the count command help?

Thank you

HI, I´ve found a solution: https://leancrew.com/all-this/2019/05/applescript-and-the-class-struggle/ This works for me.

Thank You