# Measure theory mapping sets to groups?

This is a question from a physicist wondering if a certain idea in mathematics has been developed. Intuitively, suppose I have a number of objects distributed in space. I want a function that given a subset of space will tell me whether there are an even or odd number of objects contained. If $X$ is my space, and $\Sigma_X$ is a set of 'nice enough' subsets of $X$, I'm looking for a function $\mu: \Sigma_X \rightarrow Z_2$

Of course if I'm given an ordinary measure from $\Sigma_X$ to the integers I can compose it with a map to $Z_2$. But what I'm really interested in is a distribution that can be 'integrated' in some sense over the elements of $\Sigma_X$ in order to give $\mu$.

For the ordinary measure that counts the number of objects (i.e. a map to the integers), there is a distribution in terms of delta functions. In physics we can generalize this to a continuous distribution and talk about conserved currents. In certain situations the absolute number of objects is not conserved but the parity is. It would be useful if a similar concept existed for maps to $Z_2$ or other abelian groups. Does such an idea exist or even make sense?