Are you sure you wrote that properly johny? I mean, considering the way you've wrote it I can only think of 2 answers, either 40, or 0.
40 - It doesn't seem like a riddle, it just sounds like a straight up question, 4 people, 10 each, so 40...
0 - The ONLY part that I could twist, is "Each of them collected" vs "total of gathered", so that would be collected vs gathered, and as gather could imply actually picking them up from the orchard physically and collected could imply someone else handed them over, only reason why I could say 0...
Apart from that, if I am wrong then it's probably a ridiculously easy answer or something lol.