Linear time membership for a class of XML types with interleaving and counting