Added a better instance counter