Implemented CountTypes() and CountResources() and the 1 variants thereof.
Implemented empty handles, fixed naming of MAX_HANDLE_COUNT constant.