class method that counts the amount of instances made