Hi Alex,
Another method is, take an extra text box field in data source with 0 as default value, and apply a rule for every response increment the extra field by 1.
After that apply conditional formatting on response text box that if the extra field is greater than or equal to 3 then make it read only.
Hope this will help you.
B.Shiva Prasad
InfoPath Dev,
http://www.ggktech.com
India