title: Counting word frequency and making a dictionary from it
body: <p>I want to take every word from a text file, and count the word frequency in a dictionary. </p>
  
  <p>Example: <code>'this is the textfile, and it is used to take words and count'</code></p>
  
  <pre><code>d = {'this': 1, 'is': 2, 'the': 1, ...} 
  </code></pre>
  
  <p>I am not that far, but I just can't see how to complete it. My code so far:</p>
  
  <pre><code>import sys
  
  argv = sys.argv[1]
  data = open(argv)
  words = data.read()
  data.close()
  wordfreq = {}
  for i in words:
      #there should be a counter and somehow it must fill the dict.
  </code></pre>