How to get all children that are the same kind of object?

I have a canvas panel as a variable in my user widget. I am trying to get the number of children of the canvas panel that are horizontal boxes. Is this possible?

Try this:

My Products