Information hiding is one of the key features and a powerful mechanism in Object-Oriented programming. It is critical to build large complex software that can be maintained economically and extended with ease. As information hiding improves the software productivity and promotes the software quality, it is essential to measure it. Further, the data or attribute value safety plays the vital role in the reliability of the software, which is the key factor determining the success of software. Data safety can be achieved by hiding the attribute. Hence, it is necessary and vital to measure the attribute hiding factor more accurately. This article introduces a new complexity metric called Cognitive Weighted Attribute Hiding Factor. It is defined and mathematically formulated to yield better results than the original Attribute Hiding Factor complexity metric. It is statistically proved by comparative study. Further, the new complexity metric is tested for empirical validity and applicability with a case study. The results show that the new complexity metric index due to the combination of encapsulation and attribute scoping is better, broader and truer to reality.