count not working well here