Add global counter for multiple instances