Minor edit: Added photo counter to retrieval function.