Made function call counter into a global.