They will tell you at check in, but if your connecting flight is with the same airline your baggage will automatically be transferred. Not to sure if a different airline for the connecting flight.
Edit, sorry. Didn't read your question properly. Best to ask at check in. My guess would be you' d have to collect it as there would not be a aircraft to transfer the luggage too whilst you are on your stopover. And speaking from my job experience, we wouldn't keep baggage in our facility for a connecting flight as its a security risk. But then each country and airline is different.