Count triangle, quad and Ngon

Hi,
Im very biggener in maxscripting.
I tried to know triangle, quad and Ngon Count in selected objects. objects could be inside a group.
your help will be appriciated.

Thaks in advance!!