Is it okay to stay after the work permit ends, again 90 days, or is it an overstay?
It's not an either / or situation, it's also entirely possible that he would be allowed to stay or reenter the Schengen area for a few days but not for 90 days. You can just use the usual calculators, ignoring the days spent under a valid permit.
The main thing making us confused is, does waiting for a work permit inside Finland consume tourist visa days or not (applied in Finland so can wait unlimited time for the decision in Finland)?
It's kind of moot as there is no way to prove that to other Schengen countries. I do not know about Finland but I know other countries will backdate the residence permit to the date of application, which neatly handles this issue. What matters to you right now is what the permit states.
If you add this info to the question somewhat might run the numbers but the important thing to understand is that you don't really need to figure out what the rules around residence permit applications are as they have no impact on the broader Schengen area.
To the extent that Finland wants this period not to be counted towards the Schengen maximum stay, they would do that by making sure it is covered by the permit your friend got (or providing him with another similar document). If they haven't, it means that this period counts. That is the only information that matters.