implemented counting of namespaces