common: use common uv__count_bufs code

Until now it was reimplemented in 2 different places (unix, win).