口(kǒu) is normally only used to introduce the number of family numbers while 个(gè) can be used in much broader occasions. For example,
1)我的家里有三口人
Wǒde jiālǐ yǒu sānkǒu rén
My family has three people
‘There are three people in my family.’
2) 教室里有三个人
Jiàoshìlǐ yǒu sāngè rén
Classroom has three people
‘There are three people in the classroom.’
彭小川,李守纪,王红. 对外汉语教学语法释疑201例. 北京:商务印书馆,2004.