How can I set new shard and replica number with re-index?

I have an index consisting of 40 shards and I want to make 50 shards with reindex. How can I determine the new shard and replica number with the reindex?

You can just create the target index with the 50 shards and then call the reindex API.