Fixed the counter so that it wouldn't reset to 0 every time by changin it from static