How to "count" certain events in a time series What techniques are suitable and what do I need to learn in order to
detect and count the number of "events" (pic) that consist of:

a) shape 1 3 and 4 and not of (2 and 5) or

b) of all shapes above the blue line with a certain minimum "volume" like shapes 1 and 4?

My first idea is to use a window function and somehow integrate the area but i want to be sure to use an appropriate procedure. I havent worked with time series before and I dont know were to get startet. I have to use python for this project.
Try generating a dictionary of patterns you want to identify.  You can then use convolutions/ cross-correlations to identify where these patterns appear in your data.
https://en.wikipedia.org/wiki/Convolution
https://en.wikipedia.org/wiki/Cross-correlation
http://paulbourke.net/miscellaneous/correlate/

This method is also called 'matched filter'.