What is the role of a CBC test in diagnosing anemia?