Completed countBinary