function count(name, data, level){
var c = 0;
if(level === undefined){
level = 0;
}
if(level >= MAX_LEVEL){
return c;
}
for(var i in data){
var item = data[i];
try{
// Check if we've counted it before
if(!isUnique(item))
continue;
}catch(e){
// Don't bother with primative objects
c += 1;
continue;