pep8, typos and tweaks for Python code

make wmcounter.py pass pep8 with max-line-length = 100;
replace 2 occurrences of 'milisecond' with 'milisecond';
introduce db_args to reduce code duplication.