Hi
You can do this in InfoPath .The steps are given below to count the rows of a repeating table
1. Open form in design mode
2. Add text box control
3. Go to properties window of the text box
4. Click on 'Fx' button in 'Default Value' section
5. Click on 'Insert Function' button
6. Select 'Count' from "Functions" list
7. Click 'Ok'
8. Now Double click on the link to add the repeating table for which you want to count the rows
9. Click 'Ok'
10. Again click 'Ok'
The number of rows inserted in the repeating table will be displayed in the text box
Madhuri
http://www.ggktech.com