I would say the answer is $2$: just fold the ribbon in parts of $2$, so you get a "tower" of $24$ pieces of size 2x1, which you cut in the middle. Like that, you will end up with $2$ single squares and $23$ rectangles 2x1, which are currently folded (on the edges, not the squares themselves, which is forbidden). You unfold, put all those things one on another and cut in half, and you will have $48$ square pieces.
So my answer would be $2$, using a common-sense approach.
Edit, based on comment:
In case you can't fold at all, I believe that the solution would be based on the prime factorisation:
$n = \Pi_{i}(p_i^{a_i})$, where $p_i$ is the prime factor and $a_i$ the power of that prime factor.
I believe the solution would be something like:
$$f_n = \Pi_{i}(p_i-1)\max{(a_i-1,1})$$
For $48=2^4 \cdot 3^1$, this becomes:
$f_{48}=(2-1) \cdot \max(4-1,1) \cdot (3-1) \cdot \max(0,1)$
(This is most probably wrong, but I didn't know how to handle the zero, but it goes in the right direction)
Edit, based on comment of aschepler:
Apparently $f_n$ is not really based on $a_i$, but more on $\log_2(a_i)$.