I just hate need a ref/unref to get the the number, so you think use this better? 
dynamic_cast<CStructuredLabels*>(m_labels)->get_num_labels();