Fix tag counts update upon photo deletion

The API call in method ApiPhotoController::delete is issued before the
photo is deleted otherwise it returns an empty result.