Adding count struct elements and get element type.