You could use custom attributes that do not add a value if hidden

count visible.skp