Index of layer, counting only layers with specific name
I have a comp with many layers. Some of those layers have “Control Layer” in their name. I’m looking for an expression to put on those layers, to get its number in the order. So if it’s the fifth control layer, it would give a result of 5, even if that layer’s actual index is higher.
I really appreciate any guidance anyone can give me.