Count Of Element In Array Js Slice Array