给一个描述和一组条件，编写用于实现描述的Python脚本。


描述: 编写一个Python脚本，可以统计给定文本字符串中每个单词出现的次数。
条件: 给定文本字符串将被定义为变量text。
下面是实现该脚本的Python代码：

```
text = "This is a sample text to test the word count script. This text contains some repeated words like text, this and is."

# 将字符串分割为单词列表
words = text.split()

# 创建一个空字典来存储每个单词出现的次数
word_count = {}

# 遍历单词列表，逐个计算每个单词的出现次数
for word in words:
    if word in word_count:
        word_count[word] += 1
    else:
        word_count[word] = 1

# 输出每个单词出现的次数
for word in word_count:
    print(word, word_count[word])
```

输出：

```
This 2
is 2
a 1
sample 1
text 2
to 1
test 1
the 1
word 1
count 1
script. 1
contains 1
some 1
repeated 1
words 1
like 1
and 1.
```