Hi @milanomia
The gallery field docs show how you can use a foreach loop to render out the data.
Becuase this uses basic PHP, you can follow this PHP tutorial to understand how to limit the rows:
http://stackoverflow.com/questions/1656969/php-limit-foreach-statement
Thanks
E