Counts number of photos and likes

detected bug, done function is called twice when the count is zero. One
of the if statements is wrong.