What is the purpose of the howMany integer in the wire.onReceive() function from the example code? In the master write/ slave read example for the wire library, there is an integer declared howMany that is never used.

 void setup() {
   Wire.begin(8);                // join i2c bus with address #8
   Wire.onReceive(receiveEvent); // register event
   Serial.begin(9600);           // start serial for output
}

void receiveEvent(int howMany) {
  while (1 &lt; Wire.available()) { // loop through all but the last
   char c = Wire.read(); // receive byte as a character
   Serial.print(c);         // print the character
}
 int x = Wire.read();    // receive byte as an integer
 Serial.println(x); 
}


As the function does not work without it, i would like to know what is its exact purpose.I would imagine that is something regarding the buffer size.
It tells you how many bytes have been received, and consequently how many you can read with Wire.read(). 

Before you have read anything with Wire.read() Wire.available() will return the same value.  As you read from the buffer Wire.available() will decrease, but howMany will stay the same.