Hi,
For the first part, the easiest way would be to take the button out of the repeating subform. Maybe place it just above the subform. Then it will not appear in other instances. You could include script in the initialize event, but this would not be the preferred route. Se how you get on with the button out of the subform and if you end up needing the script come back to us.
To disable the button, you will need script in the layout:ready event of the button. This is not the most efficient, because the layout:ready event fires so often (see here http://assure.ly/nB0Bvz). If your form is not too lengthy then you mightn't notice too much of a performance hit.
So, if your repeating subform is called myRepeatingSubform, the following in the layout:ready event of the button should get you close:
if (_myRepeatingSubform.count >= 3) {
this.presence = "invisible";
}
else {
this.presence = "visible";
}
Hope that helps,
Niall