putting count in js