DataProvider to support counting objects before actually fetching them. 

Currently, calling $dataprovider->count() before $dataprovider->getData() throws an exception!