add count method, add count test