Stuart,

Disclaimer:  I'm by far not an expert in Ensemble/Cache

Since your inbound is set to DocType is 2.4:ORU_R01, below is the segment path for OBX

Schema Category: 2.4
Message Structure: ORU_R01
Segment Structure: OBX

Path you followed to get to this Segment Structure:  PIDgrpgrp().ORCgrp().OBXgrp().OBX

You will need to set the index on the PIDgrpgrp and ORCgrp or if you always receive 1 PID segment and 1 ORC segment, then those values can be set to 1.  I ran the following code snippet using 2.4 ORU DocType and obxCounter returned the OBX segment count.

 set obxCounter=source.GetValueAt("PIDgrpgrp("_(1)_").ORCgrp("_(1)_").OBXgrp("_("*")_")")