code: public int getLength()
    {
  
      if (m_count == -1)
      {
        short count = 0;
  
        for (int n = dtm.getFirstAttribute(element); n != -1;
                n = dtm.getNextAttribute(n))
        {
          ++count;
        }
  
        m_count = count;
      }
  
      return (int) m_count;
    }
docs: Return the number of Attributes on this Element
  
  @return The number of nodes in this map.