you can use TableLayoutPanel1.Controls.Count for how many, and loop around the TableLayoutpanel1.Controls collection, and try to check the control type like below, you can use nice switch to do replace all the if statements.
foreach(control ctrl in TableLayoutPanel1.Controls)
{
if (ctrl is TextBox())
TextBox objTxtBox = ctrl as TextBox();
if (ctrl is CheckBox())
CheckBox objChkBox = ctrl as CheckBox();
}
[edit] Added the pre tags[/edit]