Hi @Andrew.Vernon, thanks for taking a look at this.
I ended up making some changes and replaced the boolean with an option set (for an unrelated reason actually), now that it’s an option set, I set modified attribute value of 1 for yes and 0 for no, and do a sum of the values to give the count - this works.
I am still finding my way around the service, and just hacking things together… now that I am using an option set, I find I can no longer sort a repeating group by those values (as discussed in this thread: Options Sets - Can't use for dynamic sorting?). I fix one thing and something else breaks! That may sound like a complaint, but actually I find it really fun - hopefully with all this experience I’ll start to appreciate the caveats of each structure and be able to better spot problems before they come up!
Anyway thanks for your help with my query!