Difficult

If 66 = 2, 99 = 2, 888 = 6, 00 = 2, 7777 = 0, 667= 2, 276 = 1, 833 = 2, then what does 2876 equal?