.count was returning incorrect number