Hello,
Are you sure you are using right relationship name? I have tested it and if I set two documents related to my document then I can see them in macro editor as well as the 2 value in the Count property as you can see on the screenshot below:
Please check appropriate path/relationship name in your macro editor.
FYI, these methods are hardcoded into DLL files, so if you don't have a source code, you can't see its source.
Best regards,
Jan Hermann