Update gofr.py

improve second version of pair counting algo