I have a set with an arbitrary amount of positive and negative numbers. Now I want to calculate the mean value of all numbers inside the set which are greater than $0$. Is there a mathematical way of expressing the amount of number inside a set?
I would write the mean calculation as follows:
$$d = \dfrac{\sum\limits_{i=0}^{n}element_i \text{ where }\ element_i \in \mathbb{N^*}}{n}$$
So how is the mathematical correct way of expressing the correct amount of $n$?
Suppose that $A$ is your set. Let $B = \{x \in A \mid x >0\}$. Then your required average is just $$ \frac{\operatorname{sum}(B)}{|B|} $$