i have a checkboxlist control
Using Linq
var count= chkmenuitemdef.Items.Cast().Where(c => c.Selected).Count();