Count all of the items in the
Controls
object on your form where the type is
Button
. Here's the code for C#, it shouldn't be hard at all to convert it to VB.Net (the code uses Linq):
var count = (from ctrl in this.Controls
where ctrl is Button
select ctrl).Count();