Yes, counter will be shared across all instances of objects of type Foo in your executable. As long as you're in a singlethreaded environment, it'll work as expected as a shared counter.
In a multithreaded environment, you'll have interesting race conditions to debug :).