The int argument is the index of the perk entry, the Nth entry. Here's some code to set the quest of all entries to SomeQuest:
Perk property SomePerk auto
Quest property SomeQuest auto
function DoStuff()
int numEntries = SomePerk.GetNumEntries()
int i = 0
while i < numEntries
SomePerk.SetNthEntryQuest(i, SomeQuest)
i += 1
endwhile
endfunction