How to set the shards of Elasticsearch 5

Read this: https://www.elastic.co/guide/en/elasticsearch/guide/current/capacity-planning.html