Count gas for additional memory

[#79942174]