Dear Rahul-Zope,
You will get gratuity for 8 years.
To know the logic, you are requested to please read the section 4(2) in which it is stated that for every completed year of service or part thereof in excess of six months, the employer shall pay gratuity to an employee. What does it mean that if employee works for more than 6 month in a year, that year shall be considered as full year for payment of gratuity. Six months and less shall be ignored.