Let's say your list is called ListBox1, and the text box is TextBox1. Then you need a code
TextBox1.Text = ListBox1.Items.Count.ToString();
Of course, knowing your platform (WinForms, WebForms, Html, etc.) could help in a more accurate answer.
source share