 
     public init(_ kind:Kind = .Binary) {
         self.kind = kind
-        let resource = kind.unitsCount()
-        semaphore = dispatch_semaphore_create(resource)
+        semaphore = dispatch_semaphore_create(kind.unitsCount())
+    }
+    public init(resource:UInt16){
+        self.kind = .Counting(resource:resource)
+        semaphore = dispatch_semaphore_create(kind.unitsCount())
     }
     
     //MARK: - Semaphore core method

public postfix func -- (semaphore: Semaphore) {
    semaphore.wait()
}

        mutext = Mutex()
    }
    func access(block:(object:T) -> Void) {
        mutext.synchronize { (Void) -> Void in
            block(object: self.object)
        }
    }
