counted bits that are on in bytes, using two diff methods