Sorry to be a dummy but I'm trying to write a script that compares the number of PCs perceived by an NPC to the number of creatures of the same faction (or tag) perceived by the NPC. Or rather gives me the total number of (eg) PCs=3 TalkingFrogs=78.
I can't see a function that's called anything like GetNumberOfThingsInAGivenArea() and any scripts I look at for inspiration do unfathomable things with GetFirstPC/GetNextPC && !! ==

Is there a quick way of doing this? Be the first to help a doddering old fool out.
TIA
TnD