Hi Micky
The following steps helps you on how to restrict insert item option for MasterDetail table till 5th option
1. Open InfoPath form and extract form file to a folder
2. In the extracted files, you will find Schema.xsd file
3. Open the Schema.xsd file in VS to view the code of the schema file
4. Go to the Detail table of the master Detail table in the schema code
5. For "maxoccurs" Change 'unbound' to '5'
6. Save the Schema.xsd file and close the schema file
7. open the InfoPath form and preview the form