Added lockpatterncounter