title: Count the amount of lua_getfield
body: <p>Is there any way to count the amount of lua_getfield that exists in my code? If yes how?</p>
  
  <p>I have a code with multiple lua_getfield as an example below:</p>
  
  <pre><code>lua_getfield(L, -1, "MAC");
  lua_getfield(L, -1, "IP");
  lua_getfield(L, -1, "PASSWORD");
  </code></pre>
  
  <p>I want to create a message to show the amount of lua_getfield being made reading the code in my C program, for example:</p>
  
  <pre><code>printf("There are %d lua_getfield", function);
  </code></pre>