The FSO dbus api let's you fetch the information regarding phonebooks and it'll tell you how many slots the sim card has for that phonebook. No need to manually set a limit. -david