Just a longshot...
You ARE trying to determine how many bytes are in the buffer, yes? Not the SIZE of the buffer?
I didn't follow all of your code, but the Flash function looks okay...
If you're getting two flashes, I'd guess that there two bytes in the buffer at the time you reach the call of Flash.
It might be worth doing a little debug version that tests Flash in more isolated circumstances.
I note you are doing a third Serial.read after the Flash call, when you don't know that there are more than two bytes TO read. (You don't actually test whether there's ONE to read, but Flash seems to say that there is.
You might want to use the fact that Serial.read returns -1 if there is no data TO read at the time Serial.read is called.
I'm sending four bytes from my PC app, and I'm pretty certain that it really does, since the part of the program that I was supposed to debug actually does work as assumed. Otherwise I would not have gotten any response as far as I can understand.
For a moment I almost thought that serial.available() returned the number of int:s in the buffer, but I tried sending a lot more bytes, getting the same response, two blinks.