给定一段文本，编写Python代码来计算文本中每个单词出现的次数。


示例文本：The quick brown fox jumps over the lazy dog.
```python
text = "The quick brown fox jumps over the lazy dog."
word_counts = {}

for word in text.split():
    word_counts[word] = word_counts.get(word, 0) + 1

print(word_counts)
```

输出结果：

```python
{'The': 1, 'quick': 1, 'brown': 1, 'fox': 1, 'jumps': 1, 'over': 1, 'the': 1, 'lazy': 1, 'dog.': 1}
```