What is the number being sent by the other device?
Is it a single byte, or a 4-byte long-integer, or what?
If you are trying to read a single BYTE, then use
// var tmp; //assumed...
BYTE tmp_byte=0;
port_read_bytes(portSerial, &tmp_byte, 1);
tmp = tmp_byte;
If you are trying to read a long-integer (ie "9, 0, 0, 0" )
// var tmp; //assumed...
long tmp_long=0;
port_read_number(portSerial,&tmp_long);
tmp = tmp_long;