python scripts for counts