If I understood correctly, you want to read a group, get an output like with C2, and simply go through and process each individual.
I don't quite understand the use of the variable "namecount" yet.
If this is the case, as I just described, try using this code, insert it into your flow (copy & paste -> https://lehmann.ws/2022/12/21/powerplatformtip-12-components-for-powerautomate/) and build it the same way in your setup.
{"id":"f804366a-682d-4fd3-9006-4ba8100e251b","brandColor":"#8C3900","connectionReferences":{},"connectorDisplayName":"Control","icon":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KIDxwYXRoIGQ9Im0wIDBoMzJ2MzJoLTMyeiIgZmlsbD0iIzhDMzkwMCIvPg0KIDxwYXRoIGQ9Im04IDEwaDE2djEyaC0xNnptMTUgMTF2LTEwaC0xNHYxMHptLTItOHY2aC0xMHYtNnptLTEgNXYtNGgtOHY0eiIgZmlsbD0iI2ZmZiIvPg0KPC9zdmc+DQo=","isTrigger":false,"operationName":"Scope","operationDefinition":{"type":"Scope","actions":{"C2":{"type":"Compose","inputs":[{"Email":"XY","Name":"XY"},{"Email":"XY","Name":"XY"}],"runAfter":{}},"Apply_to_each":{"type":"Foreach","foreach":"@outputs('C2')","actions":{"AC":{"type":"Compose","inputs":{"data":{"acDecision":"Yes"}},"runAfter":{}},"Condition":{"type":"If","expression":{"equals":["@outputs('AC')?['data']?['acDecision']","Yes"]},"actions":{"Compose":{"type":"Compose","inputs":"@outputs('AC')?['data']?['acDecision']","runAfter":{}}},"runAfter":{"AC":["Succeeded"]}}},"runAfter":{"C2":["Succeeded"]}}},"runAfter":{}}}