Import a data set where each point is separated by a newline in the list by going into the editor and right clicking on the list called "Data." Then click import. Import your text file and run the code. To change the threshold of how big the spike must be to count, find the second line of code, "Set Threshold to [5]" and replace 5 with whatever your threshold is. Run on turbo mode for fast results. Normal mode looks cool while it runs.
I needed a way to count spikes in a data set, and I wasn't sure how to do it with a batch script and I didn't feel like using python. Scratch has a way to interface with text files. Hence the list "Data." This makes it easy for me to import my data.