If I'm interpreting
Wang's implementation correctly, the number of potential topics starts out as K and is reduced gradually by
HDPState::compact_hdp_state.
Wang's write-up, he gives and indication where the algorithm only found 110 topics when given an initial K=150.
It appears that Wang drops topics when the mechanisms of the variational inference cause the topics to have no words.
At each step the value (num_topics) is essentially decremented if word_counts_by_topic_[k] == 0.
(The code does not explicitly decrement, it loops through topic indexes and essentially jumps over index k unless word_counts_by_topic_[k] > 0.
Then if it finds it has jumped over an index, it essentially removes the associated topic from the model and at the end resets num_topics to the number that were not skipped.)
I cannot find anywhere in the gensim code where num_topics (m_T) is changed.
One thing you might do is search through the topics found and see if any are empty (i.e., they have no words).
I don't understand HDP well enough to know whether that makes any sense---I'm just doing a quick look at the code.