count not fully working