keep a running count of buffer allocations so freed buffers aren't queued twice

@bordicon @jcappaert