Add count method to adapter