When a prime minister claims that a vote on a particular matter will be a confidence vote, it's often just posturing. The executive branch cannot decide whether a matter will be a question of confidence; only the House can.
Here's the example I sometimes give my students. When a person cheats on their spouse, who do you ask whether the person who was cheated on still trusts their partner? Do you ask the cheater or the person who was cheated on?
The point is that it is up to the House to determine whether a matter is a question of confidence. In a majority government, the prime minister commands a majority of members, and that's why a prime minister often calls an issue a question of confidence. If a prime minister wants to call an election, all he or she has to do is request that Parliament be dissolved.