PythonでCSVの整合性チェック

Python(v2.7)のcollectionsを使って,CSVの列数の整合性をチェックしています.というのも,Webサイトから取得した情報をCSVに変換しているのですが,そのプログラムが悪いせいか,列数の整合性が取れず,エラーが出たためです.
入力ファイルはUTF8でエンコードされていると想定しています.

Python 2.7+Win7で動作確認しております.


from collections import Counter
idx=0 # Line Index
for line in open('hogehoge_UTF8.csv', 'r'):
itemList = unicode(line[:-1],"utf-8","strict")
cnt=Counter()
for word in itemList:
cnt[word] += 1
print str(idx)+"行目の列数:"+str( cnt[','])
idx+=1;

Pythonスタートブック

Pythonスタートブック