Convert port number to integer