ENH: Added utility functions

Added functions m_i, choose, count_coef