fix count implementation