Added pagination to the model index view (the paginator UI needs work).
Fixed an issue with the count functionality.