Suppose there are n photos. There are 8 friends. Each photo has 5 friends. So, Total count of people in photos is 5n. Also Let x friends appear in 2 photos and (8-x) friends appear in 3 photos. So, Total count is 2x + 3(8-x) = 24-x. So, 24-x=5n. Note that x<=8. So, only possibility for 24-x to be the multiple of 5, is when x=4. That gives 5n=20 and so, n=4.
Interesting (When worlds collide?) it is. I too think about it. I am not sure whether I miss something. Wondering about this :- Conduct the fair lottery. If only all the individuals in the group win, That group will be selected. Otherwise the entire group will be rejected. If none of the group wins, Conduct the lottery again ?