Initial commit for external gw reference counting