I have created an endless loop within Rules that will evaluate nodes after they are created and reschedule itself as shown here:
I would like the loop to close after three emails have been sent. A counter could be added to the action set under "Send Email" then the conditions could include a Data Comparison to see if the counter is less than 3.
I have tried creating fields within the content type that would have the Rule Component increase the counter field by one every time the email section was executed then have a data comparison between the counter field and a Email Max field that had a default value of 3. I wasn't able to get this to work because the counter would not be increased.
Could this be done with an "Execute Custom PHP Code" action?