use a array record how many times every bit occurs