added the count method