Gender and sex are interrelated variables but not same. In your field of research, do you use "gender" or "sex" (or both) when measuring demographic characteristics?
SEX refers to a person's biological sex (two categories --male, female), based on the difference in anatomy of an individual's reproductive system, and related sex characteristics.
GENDER refers to "... the complex interrelationship between one's biological traits and one's internal sense of self as male, female, both or neither as well as one's outward presentations and behaviors related to that perception" GenderSpectrum.org. There could be a larger number of categories use to capture gender.