Who should be counted when responding to 你家有几口人 (nǐjiā yǒu jǐkǒurén) "how many people are there in your family"? An early question in Chinese people learn is:

你家有几口人？
How many people are there in your family?
(nǐjiā yǒu jǐkǒurén)

My Chinese text book contains these example responses:

五口人。他们是我爸爸，我哥哥，我弟弟和我。你呢？(Five people. They are my father, mother, older brother, younger brother, and me.  And you?)
我家有三口人：我丈夫，我儿子和我。(My family has three people.  My husband, my son, and me.)

and

你家有三口人，你爱人，你儿子和你，是吗？
(Your family has three people, your spouse, your son, and you, right?)

But I'm confused...
Question: Who should be counted when responding to 你家有几口人?
I'm confused in particular about the following:

I'm unsure if aunties, cousins, brothers-in-law, nieces, ex-husbands, half-sisters, etc., are included.

I don't know if living separately affects things (since 家 also means home).
When I go home 回家 (huíjiā) it's just me, but my sisters (姐姐 and 妹妹) are still my family members 家人 (jiārén).  Both of these use &quot;家&quot;.
It is simple-- The "家" in  "你家有几口人？" always refers to "家庭" (household) 

Your answer should only list the family members living in the household .

Using 口 as a classifier also indicates it only count people who eat their meals in the household.

As long as someone living in a household long term, he or she is counted as 一口

If you read Chinese novel, you would often see phrase like "我家一百一十八口性命" (One hundred and eighteen lives in my household) You can see they even counted servants.

If the question was "你家中有什麼人?" (who are in your family)  Then you can include your immediate family who no longer live in the household, for example, married sister or brother who had moved out. 

If you are single and live alone, you are considered independent. When people ask you "你家有几口人？" You can say "我單身一人生活".  If you want to introduce your family, then you can say "我家中還有 (list of immediate family) "