modified getShardCount()