fix count method