Reference numbers are another thing. Genealogy applications number each new person as you enter them (that is how they internally do all the connections from one person to another - number 26 is married to number 27 and has children 31 32 33 and 41, for instance, though they add the right names when they display them to you)
That is no use as a paper filing system, though. You want yourself at number 1, your parents at 2 and 3, and so on. What I do is sytematically choose an extra reference number from Rootsmagic's list of set data types.
I t looks daunting at first, but once you start it all follows very simply. Basically, for direct ancestors (ignoring indirect siblings for the moment) the number for each father is twice the number of the child, and the number for each mother is twice that of the child, plus one.
So if I am 1
My father is 2, my mother is 3
M paternal gfather is 4, gmother 5, My maternal gfather is 6, gmother 7
The previous generation are 8 and 9, 10 and 11, 12 and 13, 14 and 15,
and so ad infinitum.
Nondirect ancestors (siblings of direct ones) I don't number at all - they are lumped in with their parents - but they can be labelled as, say, 4. 1 for the eldest child of my paternal grandfather - (that would be my Auntie Vi, and my cousin Marian would be 4.1.1 - the eldest child of my Auntie Vi)
The name for this system (which could be even more complicated if you like that sort of thing) is Ahnentafel. As it sounds, it is of efficient German origin.