Implemented shard count persistence.