One way to fix it would be to use the onDestroy :

    1. <script>
    2. import { count } from './stores.js';
    3. import Decrementer from './Decrementer.svelte';
    4. import Resetter from './Resetter.svelte';

    Any name beginning with $ is assumed to refer to a store value. It’s effectively a reserved character — Svelte will prevent you from declaring your own variables with a $ prefix.