title: Count items in dictionary
body: <p>I need to count the the different IDENTIFIERS and print a number count for the them. The information comes from a data stream that looks like this:</p>
  
  <pre><code>                             IDENTIFIER
  7756753.940 receivetest: m s 0x0000069a 8 00 00 00 00 00 e4 8a 9a 
  7756754.409 receivetest: m s 0x00000663 8 2f 00 62 02 00 e4 8a 9a 
  7756754.878 receivetest: m s 0x0000069e 8 00 1f 5e 28 34 83 59 1a 
  7756755.348 receivetest: m s 0x00000690 8 00 18 00 28 34 83 59 1a 
  7756853.908 receivetest: m s 0x0000069a 8 00 00 00 00 00 e4 8a 9a 
  7756854.377 receivetest: m s 0x0000069e 8 00 1f 5e 28 34 83 59 1a 
  7756854.846 receivetest: m s 0x00000663 8 2f 00 62 02 00 e4 8a 9a 
  7756855.316 receivetest: m s 0x00000690 8 00 18 00 28 34 83 59 1a 
  7756953.961 receivetest: m s 0x0000069a 8 00 00 00 00 00 e4 8a 9a 
  7756954.430 receivetest: m s 0x00000663 8 2f 00 62 02 00 e4 8a 9a 
  7756954.857 receivetest: m s 0x0000069e 8 00 1f 5e 28 34 83 59 1a 
  7756955.326 receivetest: m s 0x00000690 8 00 18 00 28 34 83 59 1a 
  7757053.929 receivetest: m s 0x0000069a 8 00 00 00 00 00 e4 8a 9a 
  7757054.398 receivetest: m s 0x00000663 8 2f 00 62 02 00 e4 8a 9a 
  7757054.868 receivetest: m s 0x0000069e 8 00 1f 5e 28 34 83 59 1a 
  7757055.337 receivetest: m s 0x00000690 8 00 18 00 28 34 83 59 1a 
  7757153.940 receivetest: m s 0x0000069a 8 00 00 00 00 00 e4 8a 9a 
  7757154.409 receivetest: m s 0x00000663 8 2f 00 62 02 00 e4 8a 9a 
  7757154.878 receivetest: m s 0x0000069e 8 00 1f 5e 28 34 83 59 1a 
  7757155.348 receivetest: m s 0x00000690 8 00 18 00 28 34 83 59 1a 
  7757227.369 receivetest: m s 0x00000688 8 00 00 00 00 00 00 00 00 
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>#!/usr/bin/python
  
  import subprocess
  import re, os, pprint
  
  DICT = {}
  
  def RECEIVE(COMMAND):
      PROCESS = subprocess.Popen(COMMAND, stdout=subprocess.PIPE)
      LINES = iter(PROCESS.stdout.readline, "")
      for LINE in LINES:
          if re.match(r"^\d+.*$",LINE):
              SPLITLINE = LINE.split()
              del SPLITLINE[1:4]
              TIMER = SPLITLINE[0]
              IDENTIFIER = SPLITLINE[1]
              DLC = SPLITLINE[2]
              HEXBITS = SPLITLINE[3:]
              COUNTER = DICT.count(IDENTIFIER)
              DICT[IDENTIFIER] = [DLC, HEXBITS, TIMER[6:], COUNTER]
              for IDENTIFIER, HEXBITS in DICT.items():
                  os.system("clear")
                  pprint.pprint(DICT)
  
  RECEIVE(["receivetest", "-f=/dev/pcan33"])
  </code></pre>
  
  <p>I just need to print the number of times any given IDENTIFIER has been read</p>