A C++ class arrives as a JavaScript class: new runs its constructor and its public methods are methods.
native.h declares Counter under a function like the last lesson's. await new Counter(41) runs the C++ constructor; increment and value are its public methods, and current, being private, stays inside C++.
The object lives in C++ and JavaScript holds a handle to it. The garbage collector frees it once the handle is gone; Object lifetime shows how to free it sooner.
Try it
Start a second counter at 100, increment it twice and print both values.