Let
f(x) = x - 3 if x <= 0
f(x) = 5x + 2 if x > 0
How many solutions does the equation f(f(x)) = 4 have?
The function preserves 'parity' such that positive inputs give positive answers, and the converse for the negative. So therefore, such that f(f(x))=4 so a positive input gives 4. There are no such solutions possible. We let f(x)=5x+2 for positive inputs, so f(f(x))=25x+12, which we want to equal 4. However, then x has to be negative, which is not allowed, a contradiction.
Therefore, there are $\boxed{0}$ solutions to the equation.