trying to fix count method