[SalesForce] Serial Number in first column of HTML table in apex:repeat

I have created a VF email template with a HTML table. In table i have used apex:repeat to trace all child records. But i am not able to get serial number in first column of table.

Using solution provided by Tushar Sharma is showing serial number in PDF attachement but not in email table.

   <apex:repeat var="EW" value="{!relatedTo.Event_Workers__r}">
          <tr>
            <td></td>
            <td>{!EW.Opportunity__r.Name}</td>
            <td>{!EW.Hours_Worked__c}</td>
            <td>{!EW.Base_Pay__c}</td> 
            <td>{!EW.Overtime_Hours__c}</td>
            <td>{!EW.OT_Pay__c}</td>
            <td>{!EW.Service_Charge_Commision__c}</td>               
            <td>{!EW.C_Card_Tipes__c}</td> 
            <td>{!EW.Cash_Tips__c}</td> 
            <td>{!EW.Service_Charge_Tips__c}</td>                                
          </tr>
    </apex:repeat>

Best Answer

For this you need apex:variable in Your table. Using that you can make your own count variable

<apex:variable value="{!1}" var="count" />
 <apex:repeat var="EW" value="{!relatedTo.Event_Workers__r}">
          <tr>
            <td>{!count}
                <apex:variable value="{!count+1}" var="count" /> 
            </td>
Related Topic