GetOverlayCount example for C++ 5.0 and later
ILEADRasterProcess* m_pRasterProc= NULL;
CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL, IID_ILEADRasterProcess, (void**)&m_pRasterProc);
int Count;
Count = m_pRasterProc->GetOverlayCount(m_LeadRasterView.GetRaster(),0);
m_pRasterProc->Release();