using isWhite and isBlack in check inside getpiececount instead of not 0(empty)