threads: Use a dynamic menu item count instead of hardcoded 5