I am fetching the cases and their status using SOQL query in my controller and then displaying it on visualforce using pageblock. I want to keep loading the page/query after every 5 seconds, so that if a case gets created/deleted, it automatically shows up on the visualforce page, without me manually refreshing the page. I am using a counter variable and increment counter method, just so I could implement action polling, but it has no other other purpose or relation with my actual usecase.

Here is my working code:

Visualforce:

```
<apex:page controller="CasesAndQueues" sidebar="false" showHeader="false">

 <apex:form >  

   <apex:pageBlock id="counter">

     <apex:pageBlockTable value="{!OpenCases}" var="o" >

        <apex:column value="{!o.CaseNumber}"/>

        <apex:column value="{!o.CreatedDate}"/>

        <apex:column value="{!o.Status}"/>

     </apex:pageBlockTable>

  </apex:pageBlock>

  <apex:actionPoller action="{!incrementCounter}" reRender="counter" interval="5"/>

 </apex:form>

```

Apex Class:

Here is my apex class:

```
public class CasesAndQueues {

Integer count = 0;
public CasesAndQueues(){}
public List<Case> OpenCases;
public List<Case> getOpenCases() {

    Id CaseRecordType = Schema.SObjectType.CASE.getRecordTypeInfosByName().get('XYZ').getRecordTypeId();
    List<Case> Cases=[SELECT CaseNumber, CreatedDate, Status FROM Case WHERE RecordTypeId =: CaseRecordType and (Status =: 'Ready to Meet' OR Status =: 'New')  ORDER BY Status DESC];

    return Cases;

}

public PageReference incrementCounter() {

    count++;
    return null;

    }

}

```

**Is there a better way to implement polling in my case, instead of using count variable, since it has no purpose in my usecase? Also, the code that I have would it cause governor limit issue?**