Welcome to iPhone Forums!
Do you use "Optimize iPhone Storage"? To find this feature, go to Settings - Photos & Camera. If it is enabled, iCloud stores your images when your iPhone is low on space, so they are not really on your device. The computer only shows images that are on your iPhone, so this could be a reason why you miss some of the pictures when you connect your iDevice to the PC.