Counting shape changing pattern in signal
You can trying using a musical pitch detection/estimation algorithm, which may be more robust in some cases than just a simple autocorrelation (especially in one of your examples that includes a slightly inharmonic overtone).  From the frequency or period of the estimated "pitch" you can compute the number of pattern repetitions per second.

A bunch of pitch estimation methods are mentioned in my answer to this question: https://stackoverflow.com/questions/7181630/fft-on-iphone-to-ignore-background-noise-and-find-lower-pitches