Different out coming

your code is not right
you are just returning a new array of size count at the end so it ll be all 0