Suppose there is a new social page like facebook but every time someone publishes something, the publication automatically is re-published by all it's friends. This function causes a chain reaction, causing every friends of the first person's friends to also re-publish it and so on.
The publication can be done only once from every user.
Is there any graph algorithm that I could use to count the total number of the publications/republications and how?