Since, the value of the function is dependent only on the number of 1's in the n-bit string .
The possible number of ones are : 0,1,2......,n. There are n+1 possibilities.
Now map each of these possibilities of number of ones to 0 or 1.
Therefore no. of such functions = $2^{n+1}$.
$\sigma_4$=$2^{4+1}$=32