Consider three boxes A, B and C. Distributing four objects(the objects of set S) in 3 boxes can be done in 34 ways. There is also a case where none of the objects are distributed in the boxes(null set).
Now if the boxes A and B were identical then interchanging them would not change the case as our pairs are unordered. Box C would have left out elements.
Thus the required number becomes 34 + 12! = 41.
This was how my sir explained it to me