Looking into this so we can hijack it to have some kind of counting information.
It’s read at 08085E40. It seems that it jumps to a routine specified in a jump table at 0x8085E5C. So Number of Enemies would be at *8085E60, which is 08085E78.
I think 08085EBA counts all the units with the 0x80 bit set in their deployment number, so that’s enemies and other units.
080050A - bl #0x800578C converts the number from hex to ASCII I think. 08085EC6 - bl 0x8005B3C is called with r3=the number of enemies and supposedly loads the ascii into a buffer or something?