code: public int size() {
  	int size = 0;
  	for(Ta a: getKeys()) {
  	    for(Tb b: get2ndValues(a)) {
  		size += get3rdValues(a, b).size();
  	    }
  	}
  	return size;
      }
docs: Returns the number of &lt;a,b,c&gt; triples in
  <code>this</code> ternary relation.  Linear in the size of the
  relation.  This may be also implemented by incrementally in
  O(1) by updating a <code>size</code> field, but that may
  complicate the code in the presence of subclassing, etc.  Will
  think about it if it becomes a problem.