Counting Subsets of a Set—how does this work? I know a couple of ways to do this. However, I couldn't quite follow the logic of the accepted answer in this question... 
What is the proof that the total number of subsets of a set is $2^n$?
...which says that there are two possibilities of an element being present in any subset of a given set, so all of them are multiplied. 
I fail to understand exactly how many times I should do that. And that exactly is the answer. It doesn't seem that the answer explains this issue, but how does it work then?
 A: You should do it $n$ times.  Given a set $A$ with $n$ elements, pick one specific element, $a$.  The subsets of the set are those of the set $A \setminus \{a\}$, plus those of $A \setminus \{a\}$ with $a$ added.  As $A \setminus \{a\}$ has $n-1$ elements, $A$ has twice as many subsets as a set with $n-1$ elements.  Follow this recursion down to the empty set, with $0$ elements and $2^0=1$ subset, and you are there.
A: You should multiply $2$ by itself $n$ times, where $n$ is the number of elements in your set. Consider the following:
You have a set $S$ with $n$ objects, and there are $k$ possible subsets you can make. Now add another object to $S$, that you have $n+1$ objects. How many subsets will you have now? Well you can for sure have at least as many as before, namely $k$. But you can now just add the $n+1^{th}$ term to each of the $k$ subsets, so you create another $k$ subsets. So now the number of possible subsets you can have is $2k$. 
Moral: Adding an element to a set doubles the number of possible subsets. 
Start with a set of $1$ object, and notice that you have $2$ possible subsets. By the above, if we add an element to the set, we have $2 \cdot 2=4$ possible subsets, if we add another element we have $4 \cdot 2$ possible subsets, and in general if we have $n$ elements we will have $2^n$ possible subsets.
Bonus: The basic idea of what we did above is called mathematical induction.
A: the statement is true for $n=0$, so suppose it is true for $n \le m$. Adding one more element to the set doubles the number of subsets as Ross pointed out, so the statement is also true for $n=m+1$. Thus you have an inductive step which shows the statement true for all non-negative integers
A: You ask what is the idea of this argument.
Suppose you decide my goal is to make a subset.
For each element you have two choices as to whether to put it in your subset or not.  So there are $2^n $ total results of $n $ choices.  Each result yields a distinct and unique subset.  (For a result to differ from another result there must have been one element where you made a different choice.  One result has the element in you subset and the other doesn't).  So there are at least $2^n $ subsets (at least one for each result.)
Now any possible subset can be the result of a string of chooses.  The result of choosing to include precisely the exact elements of the subset and to exclude precisely the exact elements not in the subset, will result in precisely that exact subset.
So the number of distinct subsets is the exact number of possible choice results.  Of which there are $2^n $.
...
That is the meaning of that argument.  However if you prefer another approach there are others.  
(The argument that always "worked" for me was:  For any individual subset and any individual element of the master set there is one alternative subset that is exactly the same except it differs in whether it contains that one element or not.  So subsets come it pairs based on elements.... and that's enough for me.  But it's a pretty vague argument exactly how we group and combine the pairs but that never was my issue.)
(An argument some people like is to take all the subsets, divide into two groups, those with element #1, and those without.  Then divide those two groups into two, those with and without element 2, and so on, clearly each step will result in splitting every group [you'll never have a point where you notice "gee, all the sets in this group have element e and none don't"] and the final groups will each have exactly one set [you can't have two or more sets where each set have the same selection of elements] and you will have $2^n$ groups.  Other people don't like it as it "works backwards".)
A: Proposition: The number of functions mapping the finite set $X$ into the set $\{0, \, 1\}$ is the same as the number of subsets of $X$.
Proof
Map any such function to the subset $f^{-1}(1)$ (inverse image of {1}) of $X$. It is rather straightforward to show that this is a bijective correspondence. But that means they have the same cardinality.
QED
Now apply the counting method found in "The number of functions mapping $A$ to $B$" and you will see that the total number of subsets of a set is $2^n$.
A: Here's the analogy I like to think through. Suppose I have a set $A = \{ a_1 , \ldots , a_n \}$. We can imagine we have $n$ lightswitches, enumerated $1, \ldots , n$. Now say you hand me a subset $S \subseteq A$. Then I can go down the line and flip switch $1$ to on if $a_1 \in S$, and flip it off if $a_1 \not \in S$. I can then do the same for all $n$ switches. I can thus map the subsets of $A$ bijectively to the set of configurations of $n$ switches, of which there are $2^n$.
The more general statement is that the power set of $A$ is bijective with the set of functions $A \to \{ 0, 1 \}$, where a subset $S$ corresponds to its indicator function (i.e. the function such that $f(a) = 1$ if $a \in S$, and $f(a) = 0$ if $a \not \in S$.
