Serial Available confuse..

I have read that link but it is not complete to explain every possibility

Given that the serial buffer can contain up to 64 characters, all possibilities would take too much page space to enumerate, so they probably listed a few, and left the reader to figure out the rest.

what its purpose to put 18 there?

To ensure there are at least 19 characters to read before going about reading them.