Trouble with a Turn counter

Is there a way to have the turn counter advance each time a card is placed into a discard pile or removed from a deck?

Or perhaps have a piece defined with multiple layers that looks for the count of cards in a deck that alters it’s layer number? I’m thinking an attachment feature might work, yes? no?