Convert port to number