count-loc-increase: count hg repo and rewrite with Python