Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. Return k, the count of elements not equal to val.