Let $X=\{a, b, c, d, e\}$ and $P(X)$ be the power set of $X$.
Define the functions $f:P(X) \to \mathbb{N}$ by $f(A)= 1 + |A|$, where $|A|$ is the number of elements in set $A$, and $g:\mathbb{N} \to \{0,1\}$ by $g(n)= 1$ if $n$ is prime, $g(n) = 0$ otherwise.
Write the number of elements in $P(X)$ for which $(g \circ f)(A) =1$.
Number of elements in power set gonna remain same whatsoever, ie $2^5$ but that doesn't seem correct. In relevance to the question, I figured out we need to find number of elements in $P(X)$ for which $1 + |A|$ is a prime number. A hint will be appreciated.
For $A \subseteq X$, you have that $|A| \in \{ 0, 1, 2, 3, 4, 5 \}$, whence $f(A) \in \{ 1, 2, 3, 4, 5, 6\}$.
Now find the prime numbers among these, subtract $1$, and what are the subsets of $X$ having the resulting cardinalities?
The resulting cardinalities are, of course, $1$, $2$ and $4$.