#11 add count method to resources for pagination