文章に単語が何回登場したかカウントする
みたいなことをしたい時に、
if word in count:
 count[word] += 1
else:
 count[word] = 1
みたいに毎回判定が入る

perlなら問答無用に
$count[$word] += 1;
で済んでしまう