To test the effectiveness of cognitive-behavioral counseling on the rate and duration of exclusive breastfeeding ( EBF ) during the first 6 months of an infant 's life compared with routine counseling .