convert serial read to int

That depends on what you transferred over the serial interface (in what format the int got transferred). You can send it in decimal ASCII, hexadecimal ASCII, binary, BCD (binary coded decimal) and many other formats. The most common used formats are binary and decimal ASCII, which one did you choose?