We also added av_count() in-line function. It's a dependency and it toke a big traction in the upstream. It will ease backporting future fixes.