Serial.read() only returns a char, so String functions aren't going to always work. If you are reading a single character, the only numeric values you can read are the digit characters '0' through '9'. To make an int:
char c;
int num;
if (Serial.available()) {
c = Serial.read()'
num = (int) (c - '0');
// whatever...
}
So, if you touch the '5' key, c will equal 53. Since an ASCII zero is 48:
num = (int) c - '0';
num = 53 - 48;
num = 5;
If you want numbers greater than 9, you need to read the data from Serial.read() into a char array, add the null character at the end of the array, and then call atoi() to convert from ASCII to int.