Add shardspec for hash based sharding and determine shard count by cardinality estimation