[WidgetControl] Add get widget count API for internal (#1760)