I have 3 tables: goods, store and pics. In the first table goods titles are stored. In the second - balance of goods in different stocks, in the third - links to goods pictures.
First consider the size of the join. If there are two pictures for one good then there will be twice as many rows for this good. Actually the rows will be duplicated but for the picture part. Hence the sum of the store.rest will pick up everything twice. With three pictures you would get three times the output.