You get the size of sessions by summing up the size of the tracks of one session (use ntiSessionNumber of NERO_TRACK_INFO). To get the whole size of one session you have to add the size of the leadin and leadout of the session. You will have to look at the CD specifications to get the size of the leadin and leadout of the sessions.
Capacity of the whole media:
Size of all sessions + free capacity + unused blocks.