move counter to be before portal directory info in Directory.
add macros for Directory pieces in portal.h