In SPI, the slave can't tell the master that it has data and can't initiate a transfer.
The master needs to clock-in any data from the slave, so if the master has no data to send, but there is data to receive, the application needs to send some "dummy" data to clock-in the data from the slave. So in essence it (the application/driver) needs to know how many bytes to retrieve.
For Example:
A DIGI 900MHz XBee module can communicate via SPI. It does have a pin indicating when it has data. This pin can be used by the application to know when to stop sending "dummy" data.
If there is no access to this pin, the XBee packet needs to be analyzed to know when the full packet is received.
But normally if the slave can have data without the master requesting it, the slave needs some way outside the SPI interface to let you know (e.g. the "Data Available" pin).
You don't give any details as to your SPI slave or why you don't know how many bytes to expect, but I would say that in your case you need to analyze the data received to know when all the bytes have been received.
Hope this helps.