Issue with burning an NFT

Hi,

I have a contract, which in one if its a function is responsible to burn a erc721 compliant nft, and in that function I need to access the totalSupply() method so I am using https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/ERC721Enumerable.sol as the type of the function param in the contract kind of like

function executeSale(
    IERC721Enumerable _nft,
    uint256 _id
) 

but the issue I am facing is since _burn here https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol is internal and though this method here (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/ERC721Enumerable.sol#L72) allows transferring the nft to address(0), but it inherits ERC721.sol and does not override any transfer function .

and https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol#L333 here, transfer to address(0) is not permitted

So how can I execute burning nft with ERC721Enumerable since I do need the totalSupply inside the function too ?