I think both are actually acceptable but with a slightly different feeling.
If I say "У меня было два друга" it feels like I don't have them anymore (either they died or we just live apart or we're not friends anymore)
"У меня были два друга" sounds like they were "у меня" i.e. at my place...
"В комнате было две коровы/пять коров/...." sounds like they were standing there when I came in
"В комнате были две коровы/пять коров/...." sounds like they came in and left, they used to be there, and I deduce they were there by their traces.
In case of chairs I don't even know. It's much more natural to say "было", but it definitely does not depend on the gender or case