Get rid of the global netcnt variable