Implemented counting call_functions.